How will I be able to remove [NSNull Null] objects from NSMutableArray?

后端 未结 5 730
南笙
南笙 2020-11-30 12:22

I need to remove Null object added by

 [mutArrSkills addObject:[NSNull null]];

Do I need to iterate? Is there any function to remove all nu

5条回答
  •  悲哀的现实
    2020-11-30 13:06

    You can use NSMutableArray's removeObjectIdenticalTo: method, as follows

    [mutArrSkills removeObjectIdenticalTo:[NSNull null]];
    

    to remove the null values. No need to iterate.

提交回复
热议问题