UITableView当我将 segue 拖到要推送的另一个视图控制器时,出现以下错误。
"invalid nib registered for identifier (Cell) - nib must contain exactly one top level object which must be a `UITableViewCell` instance"
我的故事板上有一个UITableView。我通过情节提要在 UITableView 中放入了两个静态行。我通过情节提要为这些行提供了“单元格”的单元格标识符。
这是我的cellForRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
    [cell.textLabel setFont:[UIFont fontWithName:@"GothamRounded-Light" size:18]];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(40, 13, 300, 30)];
    label.textColor = [UIColor statLightBlue];
    [label setFont:[UIFont fontWithName:@"Rounded-Light" size:18]];
    [cell.contentView addSubview:label];
    if(indexPath.row == 0){
        label.text = @"Credit Card"; // man profile
        cell.imageView.image = [UIImage imageNamed:@"CreditCardIcon.png"];    
    } else if (indexPath.row == 1) {
        label.text = @"Promotion Code"; // credit card
        cell.imageView.image = [UIImage imageNamed:@"PromoCodeIcon.png"];
    }
    return cell;
}
在这一点上,一切都很好。但这是我所做的导致上述错误的原因:
如果我控制从故事板中的第一个单元格拖动UITableView到创建 segue 的任何其他随机视图,则会导致上述错误。如果我删除所说的 segue,错误就会消失。
关于我做错了什么的任何线索?