Iphone ';UITableView数据源必须从tableView返回一个单元格:cellForRowAtIndexPath:';代码5
我在TableView中遇到了一个问题,在旧的Xcode版本中并没有,我只是在UITableView中创建基本单元格,但我遇到了下一个错误 “NSInternalInconsistencyException”,原因:“UITableView数据源必须从tableView:cellForRowAtIndexPath:返回单元格” 这是.m中的代码 //第二名 有什么建议吗?THXIphone ';UITableView数据源必须从tableView返回一个单元格:cellForRowAtIndexPath:';代码5,iphone,uitableview,xcode5,Iphone,Uitableview,Xcode5,我在TableView中遇到了一个问题,在旧的Xcode版本中并没有,我只是在UITableView中创建基本单元格,但我遇到了下一个错误 “NSInternalInconsistencyException”,原因:“UITableView数据源必须从tableView:cellForRowAtIndexPath:返回单元格” 这是.m中的代码 //第二名 有什么建议吗?THX-(UITableViewCell*)tableView:(UITableView*)tableView cell fo
-(UITableViewCell*)tableView:(UITableView*)tableView cell for rowatindexpath:(nsindepath*)indepath
在tableView中使用大写字母“V”
>-(NSInteger) numberOfSectionsInTableView: (UITableView*) tableView
{
return 1;
}
>// numero de celdas en total
>-(NSInteger) tableView : (UITableView *) tableView numberOfRowsInSection: (NSInteger)section
{
return 5;
}
>// formato de las celdas, títulos, imágenes...
>-(UITableViewCell *)tableview : (UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *) indexPath
{
static NSString *CellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[ UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
> // configure the cell...
return cell;
}