从NSMutableArray中删除对象,下面是添加到数组的代码:
sectionInfo = [self.collectionView indexPathsForSelectedItems];
删除:
[sectionInfo removeAllObjects];
报出的错误是: unrecognized selector sent to instance 0x169cfb70
我想出错的原因是我没有将对象作为addObject
添加,但是我需求是不要这样的。
从NSMutableArray中删除对象,下面是添加到数组的代码:
sectionInfo = [self.collectionView indexPathsForSelectedItems];
删除:
[sectionInfo removeAllObjects];
报出的错误是: unrecognized selector sent to instance 0x169cfb70
我想出错的原因是我没有将对象作为addObject
添加,但是我需求是不要这样的。