Iphone Simulator Xcode 6 on IOS 8 visualize two bl

2019-04-10 15:10发布

I have tried new app in Xcode 6 and not use storyboard. But when I have ran the app, with Iphone 5,5s,6 and 6 plus, in Iphone Simulator visualize two black bars on the top and below. Only Iphone 4s there aren't black bars. Do you have an idea to resolve my problem? Thanks

enter image description here

enter image description here

3条回答
We Are One
2楼-- · 2019-04-10 15:40

You need to add a Default-568h@2x.png image file that is 640x1136 to your project. I added an all black one that was in an older project. I didn't have to set anything else, which was nice. If you are building for iOS8 and later you can just use the LaunchScreen.xib instead.

查看更多
\"骚年 ilove
3楼-- · 2019-04-10 15:43

In my case I was using jpg pictures for the default. Even though I had the correct file names and resolutions, it didn't work. Switching from jpg to png solved it.

查看更多
Emotional °昔
4楼-- · 2019-04-10 15:54

If you designed the app so that its views had the "old" screen size, and didn't design them to be responsive to different screen sizes, then the phone will add the black bars (known as a "letterbox", I think).

查看更多
登录 后发表回答