iOS6 iPhone 5 nothing clickable at bottom of screen

≯℡__Kan透↙ 提交于 2019-11-27 05:45:02

问题


I have an app I am trying to convert and make ready for the new iPhone 5 screen size. I added the new Default-568h@2x image and I set my views to autosize in IB. The views look right, they stretch to fill the screen, but any button I put at the bottom is unclickable. It's like there is an invisible line towards the bottom, about where the old iPhone screen would stop, and anything below that line is unclickable. If I put the button right on this line, the top part is clickable but the bottom part is not.


回答1:


I had the same problem... http://anthonyprato.com/2012/09/20/iphone-5-problem-with-touches-at-the-bottom-of-the-screen/

Your UIWindow created in a nib needs "Full Screen at Launch" checked.




回答2:


If you don't have MainWindow.xib in your project (and most newer projects don't), then you need one extra line in the applicationDidFinishLaunching of your app delegate:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    [window setFrame:[[UIScreen mainScreen] bounds]];
    ...
}

I put it in the beginning of the method. Worked like a charm.



来源:https://stackoverflow.com/questions/12533058/ios6-iphone-5-nothing-clickable-at-bottom-of-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!