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的然后再添加

你可能感兴趣的:(object)