2
我的应用程序在启动时失败,我所在的问题下面的代码:NSInvalidUnarchiveOperationException:不能解码类(UITableViewCellContentView)的对象
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
MyIdentifier = @"tblCellView";
TableCellView *cell = (TableCellView *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if(cell == nil) {
cell = [[[TableCellView alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
NSLog(@"this is working----");
[[NSBundle mainBundle] loadNibNamed:@"TableCellView" owner:self options:nil];
NSLog(@"this is not working----");
cell = tblCell;
}
return cell;
}
但是我在做什么错?
的错误:
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (UITableViewCellContentView)'
感谢您的帮助!
尝试再次保存'TableCellView.nib'吗? – kennytm 2010-01-31 06:19:36
同样的错误。 : - / – phx 2010-01-31 13:01:52