我正準備在tableView中使用customCellView。據我所知,在.xib和方法中一切都很完美。我在配置單元時遇到了異常。- [NSPathStore2 objectForKey:]:無法識別的選擇器發送到實例0x6a3fc60'
int listIndex = [indexPath indexAtPosition:[indexPath length] - 1];
NSLog(@"outside");
cell.lblName.text = (NSString *) [[directoryContent objectAtIndex:listIndex] objectForKey:@"filesName"];
cell.lblSize.text = (NSString *) [[directoryContent objectAtIndex:listIndex] objectForKey:@"filesSize"];
cell.lblType.text = (NSString *) [[directoryContent objectAtIndex:listIndex] objectForKey:@"filesType"];
return cell;
編譯器一直工作到NSLog(@"outside");
。但它不會繼續到下一行。我被錯誤
2010-11-15 20:32:28.623 iDataTraveller[5346:207] outside
2010-11-15 20:32:28.625 iDataTraveller[5346:207] -[NSPathStore2 objectForKey:]: unrecognized selector sent to instance 0x5f19cf0
2010-11-15 20:32:28.627 iDataTraveller[5346:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSPathStore2 objectForKey:]: unrecognized selector sent to instance 0x5f19cf0'
請幫我繼續..謝謝你提前終止..
在我看來,對於按鍵的對象之一是缺少,但不能肯定。也許你可以試着改變listIndex是如何由常量定義的,你肯定應該能夠工作。 – Vanya 2010-11-15 16:43:18
顯示所有與'directoryContent'的值有關的代碼。 – 2010-11-15 22:03:00
嗨。我在下一個答案中發佈了我的代碼。看看那個。 – iOS 2010-11-16 06:41:54