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.
You need to pass the pointer to date. Something like this:
Of course, your
currentDateclass variable should also be a NSDate pointer. It will be even better if you use a property instead of a custom made setter.