iPhone 5 (4\") bottom toolbar not responding

余生颓废 提交于 2019-11-27 13:56:31

I had the same problem and noticed that my window.frame.size.height was still 480.0.

Solved this problem by enabling Full Screen at Launch for the MainWindow.xib file:

Steps:

  1. Open MainWindow.xib
  2. Select the Window element
  3. Open the Attributes Inspector
  4. Under Window section, enable Full Screen at Launch

There are two solution to this problem :

  1. If you are using MainWindow follow these steps :

    a. Select MainWindow.xib b. Select 'Full Screen at Launch' from Windows option available in Attributes Inspector.

  2. If your application doesn't contain MainWindow then just add 'Self.View.Frame = [UIScreen mainScreen].bounds' in ViewDidLoad.

I your project has MainWindow.xib then you must have to set all splash images in order to compatible you app for iPhone 5 display.

My Project wasn't using MainWindow.xib. I added the following to viewDidLoad in View Controllers of all the screens:

self.view.frame = [UIScreen mainScreen].bounds;

add

self.window.frame = [UIScreen mainScreen].bounds;

in this method:

-(BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary*)options 

in your %your app name%AppDelegate.m file

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