0
我刚刚在我的故事板中添加IBOutlet
到我的UIImageView
,现在我的自定义TableViewCell
不再有效。添加IBOutlet并自定义TableViewCell不再工作
2012-08-13 13:30:28.052 Project[6189:fb03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<TableViewController 0x808ab80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageView.'
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CustomCell";
static NSString *CellNib = @"CustomCell";
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:CellNib owner:self options:nil];
cell = (CustomCell *)[nib objectAtIndex:0];
}
...
}
有什么建议吗?
我的TableViewCell是自定义的。更高,10张标签,4张照片。 UILabel Outlets正在工作。 UIImageView不是。这是我的问题。 – jussi 2012-08-13 12:34:21
对不起,我误解了你的情况。现在我展示了我的应用程序的一部分。我希望这对你有所帮助。 – weed 2012-08-13 12:37:50
谢谢你的工作。 但我仍然不明白为什么我不能使用IBOutlet的UIImageView。这令人困惑 – jussi 2012-08-13 12:42:15