您的位置:首页 > 运维架构

Please remove your implementation of this method and set the cell properties accessoryType and/or e

2013-12-08 20:32 357 查看
因为accessoryTypeForRowWithIndexPath函数已经不建议使用了,要替换成:

// Customize the appearance of table view cells.

- (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] autorelease];

cell.showsReorderControl=YES;

cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;

}

NSUInteger row=[indexPath row];

cell.textLabel.text=[dataItems objectAtIndex:row];

return cell;

}

同时删除tableView:accessoryTypeForRowWithIndexPath函数。这个问题不是编辑TableView时出现的,在前面写的编写简单的导航控制器中就开始有这个问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐