总结小知识

来源:互联网 发布:mysql数据库的优化 编辑:程序博客网 时间:2024/06/07 02:54
1、 字典的值为 null 怎么判断

if ([dict isEqual:[NSNull null]])

2、两者的区别,主要在于:loadview是在xib加载前调用,ViewDidLoad是在xib加载后调用,没有xib时,两者其实是等价的。

加载xib后,若修改控件的frame值,无效,需要取消控件自动布局 use auto layout

3、也可以重新加载控件的父子级关系。

4.明年2月份起,苹果官方要求,提交的app必须支持ios8SDK和64bit。详情请参考:点这里

1).设置Architectures:你想支持的指令集Valid architectures:即将编译的指令集;Build Active Architecture Only:是否只编译当前设备适用的指令集(如果这个参数设为YES,使用iPhone 6调试,那么最终生成的一个支持ARM64指令集的Binary。一般在DEBUG模式下设为YES,RELEASE设为NO);对于支持64-bit,我们可以设置Architectures为 Standard architectures,在最新的Xcode 6上,它包括 armv7和arm64。

2).数据类型变化,内存占用有变化。

5.兼容ios7与ios8的消息推送注册方式,将注册方法分为获取token和推送消息两个方法;之前安装过应用的ios8与未安装过应用的新ios8,会有区别。

详情请点击:这里

#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

if(IS_OS_8_OR_LATER) {

    [[UIApplication sharedApplication] registerForRemoteNotifications];

    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound) categories:nil];

    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];

}else{

    [application registerForRemoteNotificationTypes:

     UIRemoteNotificationTypeBadge |

     UIRemoteNotificationTypeAlert |

     UIRemoteNotificationTypeSound];

}



0 0