다른 장치에서 응용 프로그램을 테스트하고 있습니다. 내 아이팟 터치 4g에서 테스트 할 때 응용 프로그램은 아이폰 5에 잘 작동하지만, 나는이 eror 얻을 : 충돌 것코드는 iPhone 5에서 작동하지만 iPod touch 4에서는 작동하지 않습니다.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** [__NSArrayMinsertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(0x33f252a3 0x3bba397f 0x33e6f8d9 0x51e25 0x35e180c5 0x35e1814d 0x35e180c5 0x35e18077 0x35e18055 0x35e1790b 0x35e17e01 0x35d405f1 0x35d2d801 0x35d2d11b 0x37a1f5a3 0x37a1f1d3 0x33efa173 0x33efa117 0x33ef8f99 0x33e6bebd 0x33e6bd49 0x37a1e2eb 0x35d81301 0x4fc8d 0x3bfdab20)
libc++abi.dylib: terminate called throwing an exception
코드를이 하나입니다
/********/
NSMutableArray *titulosCampoTextArray = [[NSMutableArray alloc] init];
for (int i = 0; i < campos.count; i++) {
SignupCell *cell = (SignupCell*)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
[titulosCampoTextArray addObject:cell.textField.text];
}
/********/
나 ' 사용자 정의 프로토 타입 셀 (SignupCell.h) UIView 내부 UITableView 사용하여.
오류 또는 해결 방법을 찾을 수 없습니다.
EDIT : 두 장치 모두 iOS 6.1.3을 실행 중이며 Xcode 4.6.1을 사용하고 있습니다. 당신은 분명히 아이팟에 아이폰 5에 nil
를 추가 만 할 수없는 이유
NSMutableArray *titulosCampoTextArray = [[NSMutableArray alloc] init];
for (int i = 0; i < campos.count; i++) {
SignupCell *cell = (SignupCell*)[self.tableView
cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
if (cell.textField.text) {
[titulosCampoTextArray addObject:cell.textField.text];
}
}
나도 몰라 :
2 개 기기의 iOS 버전은 무엇인가요? – Raptor
@ShivanRaptor iOS 6.1.3 (두 장치 모두). –