调用 [self.keys removeAllObjects];
清空数组
就报:__NSArrayI removeAllObjects]: unrecognized selector sent to
@property (nonatomic, copy) NSMutableArray *keys;
将上面的定义改为
@property (nonatomic, retain) NSMutableArray *keys;
就可以解决了。
至于copy与retain有什么区别,可以查一下。