Note that there are some explanatory texts on larger screens.

plurals
  1. POXcode 4.5 Black Screen or Exception: 'A view can only be associated with at most one view controller at a time!'
    primarykey
    data
    text
    <p>I have an existing iPhone app that was working fine in Xcode 4.0 prior to upgrading to Xcode 4.5. Upon upgrading, now I get a Black Screen when running in the iPhone/iPad 4.3 Simulator and get the following Exception when running the iPhone/iPad 6.0 Simulator.</p> <pre><code>Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View &lt;CCGLView: 0x8c7f380; frame = (0 0; 320 480); layer = &lt;CAEAGLLayer: 0x8c7f670&gt;&gt; is associated with &lt;CCDirectorDisplayLink = 0x994c7f0 | Size: 320 x 480, view = &lt;CCGLView: 0x8c7f380; frame = (0 0; 320 480); layer = &lt;CAEAGLLayer: 0x8c7f670&gt;&gt;&gt;. Clear this association before associating this view with &lt;RootViewController: 0x8c7ef00&gt;.' </code></pre> <p>The app is using Cocos2D 2.0, and is pretty simple based on a tutorial found online. There is no XIB file. Everything is being done programmatically.</p> <p>These are the lines that cause the exception in the 6.0 Simulator (from IOS6TestAppDelegate.m):</p> <pre><code>viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; [enter link description here][1]viewController.wantsFullScreenLayout = YES; </code></pre> <p>If these lines are commented out, then the 6.0 Simulator shows a black screen as well, instead of the regular menu screen.</p> <p>I've searched online for solutions on this and tried a number of things, but have been unable to make progress. I'm fairly new to iPhone programming (though am not new to programming in general) and am really struggling with this. I would really appreciate any help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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