iphone - 单元格中未显示 UITableViewCellAccessoryDe​​tailDisclosureButton

标签 iphone ios uitableview

我正在使用 tableView 分组样式。我的 DisclosureButton 未显示在我的表格单元格中。我缺少什么?

谢谢

- (UITableViewCell *)tableView:(UITableView *)tableView 
     cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";

NSArray *listData =[self.tableContents objectForKey:[self.sortedKeys objectAtIndex:[indexPath section]]];

UITableViewCell * cell = [tableView 
                          dequeueReusableCellWithIdentifier:SimpleTableIdentifier];

if(cell == nil) {

     cell = [[[UITableViewCell alloc] 
     initWithStyle:UITableViewCellStyleDefault 
     reuseIdentifier:SimpleTableIdentifier] autorelease];


}

NSUInteger row = [indexPath row];

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

   // cell.backgroundColor=[UIColor brownColor];

   cell.accessoryType =UITableViewCellAccessoryDetailDisclosureButton;



return cell;
}

enter image description here

最佳答案

您的表格似乎处于编辑状态。您应该在编辑模式下设置 accessoryType。

cell.editingAccessoryType=UITableViewCellAccessoryDetailDisclosureButton;

关于iphone - 单元格中未显示 UITableViewCellAccessoryDe​​tailDisclosureButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13307754/

相关文章:

ios - iBeacon 广播开始,立即停止

ios - 不显示来自解析的数据

ios - UITableViewCell 滚动时弯曲动画

ios - 在 UICollection 数据源读取响应之前,如何处理来自 API 的响应?

ios - 使用 UISegmentedControl 在 UITableView 中拆分数据

ios - Google map ,使用 DispatchQueue 加载标记

ios - 为什么我的 iPhone 上没有收到任何通知?

iphone - 创建 http 服务器并通过热点连接

iphone - 如何为图层 shadowOpacity 设置动画?

iPhone : How to sync data with the web-service when internet is reachable?