Search code examples
iphoneuiviewcontrollerexc-bad-accessxcode5.0.1

exc_bad_access (code=2 address=0xc)


Got exc_bad_access (code=2 address=0xc) error at following line

createMeetUPViewController = [[CreateMeetupViewController alloc] init];
[self.navigationController pushViewController:createMeetUPViewController animated:YES];

While I am trying to navigate from one viewcontroller to next viewcontroller I got this error.Please help.Thank you in advance.


Solution

  • I declared property and synthesise for view controller and it works.