Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does EKEventEditViewController not support being pushed to a NavController? See code & error attached

does EKEventEditViewController not support being pushed to a NavController? See code & error attached.

I can present the EKEventEditViewController modally fine, BUT when I try to push via the nav controller I get the following error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'

Code is:

EKEventEditViewController *addController = [[[EKEventEditViewController alloc] initWithNibName:nil bundle:nil] autorelease];
addController.eventStore = self.eventStore;
addController.editViewDelegate = self;

[self.navigationController pushViewController:addController animated:TRUE];   // ERROR HERE
like image 355
Greg Avatar asked Sep 05 '25 03:09

Greg


1 Answers

EKEventEditViewController is subclass of UINavigationController, so it can't be pushed to another UINavigationController.

EKEventEditViewController should be presented modally.

EKEventEditViewController Class Ref

like image 199
holodnyalex Avatar answered Sep 07 '25 21:09

holodnyalex