Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen a view is dismissed, the presenting view throws EXC_BAD_ACCESS
    text
    copied!<p>I'm converting my iPhone app to an iPad version, creating new XIBs for the iPad and rigging them to the existing objective C classes using the ~ipad XIB name.</p> <p>In the iPhone version, I use the navigation controller to step backwards to the app. This should work just fine in the iPad too, but while the navigation controller does appear, it doesnt respond. In fact its invisible to any interaction, if theres a map behind the navigation controller and you double click back, you just zoom on the map where you clicked.</p> <p>So I'm including a button in the iPad view which should do the same thing. On press I call a </p> <pre><code>[[self navigationController] popViewControllerAnimated: YES]; </code></pre> <p>When I call this I get the EXC_BAD_ACCESS. I've gone in to the spooky zombie mode which gives me this</p> <pre><code>*** -[UIWindowLayer superlayer]: message sent to deallocated instance 0x83bb9f0 </code></pre> <p>Ive determined that <code>0x83bb9f0</code> is the presenting layers <code>self.view.layer</code></p> <p>I'm using ARC to handle my allocations and deallocs.</p> <p><strong>THE QUESTION IS</strong>: How can I prevent <code>self.view.layer</code> from deallocing? or how can I allocate it again at the proper time so that I dont get this error?</p> <p>I can provide more code if needed. Thanks so much!!</p> <p>Edit: Heres where the main page (landing page) is created, and the nav controller</p> <pre><code>self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; landingPage *LandingPage = [[landingPage alloc] initWithNibName:@"landingPage" bundle:nil]; self.navigationController = [[UINavigationController alloc] initWithRootViewController:LandingPage]; self.window.rootViewController = self.navigationController; // [self.navigationController pushViewController:LandingPage animated:YES]; [self.window makeKeyAndVisible]; return YES; </code></pre> <p>Then here is where the inner view is called:</p> <pre><code>mapView *MapView = nil; MapView =[[mapView alloc] initWithNibName:@"mapView" bundle:nil]; [self.navigationController pushViewController:MapView animated:YES]; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload