NSInvalidUnarchiveOperationException:无法解码类的对象(UITableViewCellContentView)

时间:2010-01-30 20:53:17

标签: iphone exception

我的应用程序在启动时失败,我将问题发现在以下代码中:

- (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)'

感谢您的帮助!

1 个答案:

答案 0 :(得分:3)

解决方案:Weird UITableViewCell Loading Exception

它是一个3.2 SDK Beta Bug!