美文网首页
NSDictionary 遇null崩溃

NSDictionary 遇null崩溃

作者: RunnerFL | 来源:发表于2017-02-23 16:53 被阅读136次

NSDictionary创建有两种方法,NSDictionary *dic =@{@"xxx":@"xxx"};或者NSDictionary *dic =[NSDictionary dictionaryWithObjectsAndKeys:@"xxx",@"xxx",nil];但是用第一种创建的dic里面的元素一定不能为空,否则就会崩溃。。。

相关文章

网友评论

      本文标题:NSDictionary 遇null崩溃

      本文链接:https://www.haomeiwen.com/subject/xypbwttx.html