argument to nsmutablearray method addobject cannot be nil 警告

You cannot add nil to an NSMutableArray, and you will raise an exception if you try to.

There's NSNull, though:

NSNull*myNull =[NSNull null];[myMutableArray addObject:myNull];


nsmutablearray不能添加nil可以是nsnull,所以在向nsmutablearray中添加string时候需要判断一下string是否是nil的然后再添加
posted @ 2013-12-25 16:20  如来藏  阅读(707)  评论(0编辑  收藏  举报