Reputation: 933
I have a modal UIView that is also a delegate so when it comes out it sends some variables back to my DetailViewController. I know the proper way to dismiss the presented ModalViewController is to dismiss it from my DetailView (the one who presents the modal view). The problem is if the modalview is a tableview it works fine but somehow this is not working.
-(void)pickDateControllerFinished:(PickDateController *)controller{
dateSelected = [controller.datePicker date];
[self dismissModalViewControllerAnimated:YES];
NSLog(@"DateSelected %@", dateSelected);
}
So the variable actually passes but the View just won't dismiss. I'm using IOS5 with storyboard, no ARC.
I get "EXC_BAD_ACCESS"
I also tried using:
[self.presentingViewController dismissModalViewControllerAnimated:YES]; // no errors but this doesn't dismiss
Running out of options here... Any sugestions ?
Upvotes: 1
Views: 349