以前用iphone4调试界面的时候用[[UISreen mainscreen] bounds] 这个可以刚好填充慢(周围不会出现黑边框)
但是如果到了其他的平台的话 iphone5.。iphone6 就会出现边缘填充不到问题
这里的解决方法有两个
1. Use Asset Catalogs
When you create a new project, there's this thing called an asset catalog which stores your launch image files. Add one of these to your project and presto!
2. Dig out some old files
If you've been around XCode for a while, you'll know that in one of the later versions of XCode 4.x, the app automatically created three default launch image files for your app called Default.png
, Default@2x.png
,
and Default-568h@2x.png
.
You need these files in your app, which are essentially just black images with the resolutions 480x320
, 960x640
,
and 1136x640
,
respectively (note that these are in HxW, not WxH).
- Add these files to your "Supporting Files" group
- Go to the project properties and select "Don't Use Asset Catalogs" from the Launch Image section
- Delete the Asset Catalog
第一个意思是说 launchscreen.xib 这个文件会包括这个界面的大小配置信息 xcode6 会自动生成 其他的版本不知道有没有,所以保留这个文件不要删除
这样使用[[UISreen mainscreen] bounds] 就能有刚好匹配当前的界面文件。
第二个意思是说
ps:有问题问google 百度就呵呵了