我有一个NSMutableArray
我已经初始化的viewDidLoad
:
self.titlesTagArreys = [@[@"Dollar", @"Euro", @"Pound",@"Dollar longString", @"Euro longStringlongString", @"Pound",@"Dollar", @"Euro", @"PoundlongStringlongString"]mutableCopy];
在.h中:
@property(nonatomic, copy) NSMutableArray* titlesTagArreys;
当我尝试删除一项时,应用程序崩溃:
-(void)removeButtonWasPressed:(NSString*)tagTitle{
NSLog(@"tagTitle - %@",tagTitle);
NSLog(@"self.titlesTagArreys - %@",self.titlesTagArreys);
[self.titlesTagArreys removeObject:tagTitle];
}
这是日志:
2013-08-06 16:15:03.989 EpicTv[6378:907] tagTitle - Dollar
2013-08-06 16:15:03.991 EpicTv[6378:907] self.titlesTagArreys - (
Dollar,
Euro,
Pound,
"Dollar longString",
"Euro longStringlongString",
Pound,
Dollar,
Euro,
PoundlongStringlongString
)
[__NSArrayI removeObject:]: unrecognized selector sent to instance 0x1c53bbd0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI removeObject:]: unrecognized selector sent to instance 0x1c53bbd0'
*** First throw call stack:
(0x327162a3 0x3a5c197f 0x32719e07 0x32718531 0x3266ff68 0x20ad55 0x20c9a5 0x20bf5d 0x346090c5 0x34609077 0x34609055 0x3460890b 0x34608e01 0x345315f1 0x3451e801 0x3451e11b 0x362295a3 0x362291d3 0x326eb173 0x326eb117 0x326e9f99 0x3265cebd 0x3265cd49 0x362282eb 0x34572301 0xafb89 0xa4d68)
libc++abi.dylib: terminate called throwing an exception