Iphone 5 资料总结

1、判断iPhone的代码
#define IS_ iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
用的时候直接

if (IS_iPhone5) {

}

2、xcode4.5不再支持armv6即:iOS4.3.3以下的系统.
不被支持的硬件设备包括:iPod 2nd gen, iPhone 3G 或更老的iPhone
例如打包时的错误提示就是:
warning: iOS deployment targets lower than 4.3 are not supported (current IPHONEOS_DEPLOYMENT_TARGET = "4.0", ARCHS = "armv7").(null):  iPhone/iPod Touch: application executable is missing a required architecture.  At least one of the following architecture(s) must be present: armv6 (-19033)
3、关于xib自适应的问题
默认的话,如果你的界面上包含scrollview/TableView的话,这个界面是不用改的,因为中间部分会自动拉伸。

如果不包含这两个全屏的控件的话,要再添加一个专门针对iPhone5的xib。新建一个xib文件,将里面view的size设置成Retina 4 Full Screen

4、iPhone5资源的加载

     icon.png   320x480
     icon@2x.png  640x960
     icon-568h@2x.png  640x1136

真机(iPhone4)和模拟器(iPhone/iPhone Retina 3,5-inch/iPhone Retina 4-inch)测试,视图可以正常加载。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值