我的故事板有问题.它工作正常但是当我尝试更改UITableView的内容属性时导致以下错误
断言失败 - [UITableView dequeueReusableCellWithIdentifier:forIndexPath:],/ SourceCache/UIKit/UIKit-2903.23/UITableView.m由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'无法使用标识符Cell将单元格出列 - 必须注册一个笔尖或标识符的类或连接故事板中的原型单元格'
我想用静态单元格设计一个分组的tableview.Thanks提前
码
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
return cell;
}
Run Code Online (Sandbox Code Playgroud)