App not using full height of iPhone 5

Deadly 提交于 2019-11-28 09:46:10
James Nick Sears

If you put your launch images in the asset catalog, this might be the problem:

In the main project settings (when you click on the top entry in the file browser) under "General", scroll down about halfway to "App Icons and Launch Images". There's an entry in there for "Launch Images Source". You'll probably see a button that says something like "Use Asset Catalog". When you click it, Xcode will ask you to "migrate" your launch images to the asset catalog. Go ahead and do this, although it's probably just going to create a new empty launch image set, which you can later delete. Then after that's done, you should see a dropdown where the button was, and in there you can select the actual launch images. Then if you want, you can go into the asset catalog and remove the launch image set that Xcode just created.

See the photo below, make sure Launce Screen File has an entry!

Just add the splash image for iPhone 5, (640 x 1136)

Do you have the launch (default) image with size 640 x 1136? If you do not have this image you should add image with name Default-568h@2x.png and with size is 640 x 1136.

Without this image iOS thinks what your app does not support the new dimension.

AppleDocs

Just came across your post while searching for something related - not sure if you've fixed it yet but I had an issue when updating my app to include retina-resolution images, and they weren't being picked up by the app.... until I spotted the Target Membership tick-box in the File Inspector for the image.

The new images that I had added to the solution were not ticked for my app in the File Inspector, so weren't getting compiled in - once ticked, they were included and displayed in the correct context.

  1. Create a new project (Single View Application).
  2. Drag the LaunchScreen.stroyboard into your project (Check "Copy items if needed").
  3. Select the copied "LaunchScreen.storyboard" as the "Launch Screen File".

I tested with a no xib/storyboard app in Xcode 7 GM.

You’re probably missing the Retina-4" version of your launch image; the system will launch your app in 3.5" mode if that’s not present. If you currently have, say, Default.png and Default@2x.png, add a 640x1136 version named Default-568h@2x.png.

I faced the same issue too. In my case I am using a MainWindow.xib file.

And when I print the frame of Window its {0,0}{320,568} but the app did not respond to the area after 480 px.

What I did , is to open the Mainwindow.xib file in interface builder and set full Screen at Launch option selected.

I am attaching the screeshot where you can find this option.

this works out for me. You also try to find that If you are using a Mainwindow.xib then apply the same.

Hope it will help you to solve your issue. Enjoy coding..!!!

Kunal Balani

Your app has been compiled with iOS 5 or earlier and you are viewing it on a device with iOS 6 or up.

set target of your application as iOS 7 in Xcode and use Auto layout constraints to make it work on both devices. I will suggest you to have multiple storyboard if you want to support iOS 5 or earlier because they don't have auto layout constraints.

You need to compile your code with iOS 6 + SDK and use Auto layout constraints.

//Edit: if you are already using iOS 6+ as your deployment target for your project

If your iOS is set to 6 and up check your storyboard settings if your storyboard's deployment target is iOS 6 and up.

If you are using the launch images asset catalog. You might not have added images for the retina placeholder. Just add images there as well. You can probably add the same image as the 2x section there. Then modify the contents.json in the assets folder so that duplicate images are not created for the same.

I followed all of the steps listed and it still did not work.

After migration I had to set a 'Launch Screen File'. After I did that it worked like a charm. If you have an older project like I did, then you can create a Launch Screen File: File > New > File > User Interface > Launch Screen.

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