Iphone Simulator Xcode 6 on IOS 8 visualize two black bars

这一生的挚爱 提交于 2019-12-06 04:28:09

问题


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


回答1:


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.




回答2:


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.




回答3:


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).



来源:https://stackoverflow.com/questions/26440467/iphone-simulator-xcode-6-on-ios-8-visualize-two-black-bars

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