显示detaildisclosure按钮的UITableView的不自定义单元格
问题描述:
如何显示一个详细披露按钮的UITableView中不使用自定义单元格。我使用accessoryType知道它:方法,但不知道如何实现that..pls帮助..显示detaildisclosure按钮的UITableView的不自定义单元格
答
//自定义表格视图单元的外观。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
[cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];
return cell;
}
[细胞setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];
答
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;