Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 916273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:01:41+00:00 2026-05-15T18:01:41+00:00

I would like to assign a date from one view controller to another -(void)

  • 0

I would like to assign a date from one view controller to another

-(void) setCurrentDate:(NSDate newDate){
    self.currentDate = newDate;
    [self updateView];
}

While debugging I see the currentDate value out of scope and the application crashes with EXC_BAD_ACCESS.

Any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:01:42+00:00Added an answer on May 15, 2026 at 6:01 pm

    You need to pass the pointer to date. Something like this:

    -(void) setCurrentDate:(NSDate* newDate){
        [self.currentDate release];
        self.currentDate = newDate;
        [self.currentDate retain];
        [self updateView];
    }
    

    Of course, your currentDate class variable should also be a NSDate pointer. It will be even better if you use a property instead of a custom made setter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You may be able to write a script to do… May 16, 2026 at 1:51 pm
  • Editorial Team
    Editorial Team added an answer Feed it to DOM loadHTML function and getElementsByTagName('p'), make a… May 16, 2026 at 1:51 pm
  • Editorial Team
    Editorial Team added an answer Use web.loadDataWithBaseURL instead of web.loadData (And don't forget to escape… May 16, 2026 at 1:51 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I would like to be able to send a string of emails at a
This is what I would like to do: I have assigned the following items:
Would like a button in my widget to fire the APPWIDGET_UPDATE intent on the
I would like to run some command (e.g. command ) using perl's system() .
Currently my application takes in a text file/files, parses them into another file type
I am struggling to know where to start when trying to assign ranks to
A simple question, I think: I want to put a tag into an ASP.NET
I am using a rails helper that creates 3 select lists for the purpose
I am trying to reorganize my Javascript into JS files and clear out my
I'm attempting to create a T-SQL case statement to filter a query based on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.