When I launch my application while some device is connected to my iPhone (hence, a blue bar showing the number of connection will be shown), my launch image (Default.png) gets deformed and the size no longer fits the screen size.
How can I solve this problem? I have tried to check the "s开发者_如何学Ctatus bar initially hidden" but it only helps after the startup image is loaded.
Thanks in advance.
There isn’t really a way around this. If I remember correctly, the system adjusts the launch image for double-height status bars by cutting out some portion of its middle; your only option to mitigate this problem is to figure out which part of your Default.png is getting cut out and change the image so that that removal isn’t as noticeable.
You can fix this problem by using a storyboard as a launch screen instead of images. Create a new storyboard and add a UIViewcontroller as the initial view controller. Layout your startup screen using constraints. For example: place your logo in the center with a UIImageView. Open your project's settings and in targets select general. Scroll down to 'App Icons and Launch Images'. Select the storyboard you just created where it says 'Launch Screen File'.
精彩评论