에서 개체를 제거 할 때 나는 viewDidLoad
에 초기화 한 NSMutableArray
있습니다 충돌 NSMutableArray를
@property(nonatomic, copy) NSMutableArray* titlesTagArreys;
나는 하나 개의 항목을 삭제하려고
, 응용 프로그램 :self.titlesTagArreys = [@[@"Dollar", @"Euro", @"Pound",@"Dollar longString", @"Euro longStringlongString", @"Pound",@"Dollar", @"Euro", @"PoundlongStringlongString"]mutableCopy];
.H에를 충돌 :
: 여기-(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
'removeObject'가 NSMutableArray에 유효한 함수이기 때문에'NSMutableArray'를 초기화하는 코드를 보여줄 수 있습니까?'unrecognized selector ... '는'titlesTagArreys'가 NSMutableArray가 아니라고 말합니다. 'titlesTagArreys'와 함께 코드를 공유하십시오. – Popeye
@ 루다 NSMutableArray (titlesTagArreys)를 선언하는 방법은 무엇입니까? – DharaParekh
하쿠나'NSMutata'. – dreamlax