Unable to start my application in full screen on iPhone 6.0 Simulator Retina 4 Inch

前端 未结 11 2196
逝去的感伤
逝去的感伤 2020-12-28 08:34

I have added Default-568h@2x.png to my project and set it in project settings, I have also set autoresizing options for my view and element

11条回答
  •  Happy的楠姐
    2020-12-28 08:54

    How are you adding the main viewController to the window? Just adding the view as a subview isn't supported any more in iOS6.

    Here's an except from an article on my blog about making apps work on the iPhone 5 screen size.

    Use window.rootViewController to add your initial view

    First up, if you're building your initial views in code make sure you add your initial view to the window with window.rootViewController rather than the old way of simply adding the view as a subview. If you don't do this, autorotating will not work at all for your app under iOS 6.

    Here's an example:

    navigationController = [[UINavigationController alloc] initWithRootViewController: myRootVC];
    //[window addSubview:[navigationController view]]; Don't do this!
    window.rootViewController = navigationController; // Do this instead!
    

    More at http://pervasivecode.blogspot.co.uk/2012/09/making-apps-work-on-iphone-5-screen-size.html

提交回复
热议问题