细胞的附件类型不会显示。我尝试过cell.accessoryType和cell.accessoryView (用图像)。除了这个之外,表视图工作得很好。有什么建议吗?谢谢
我的代码:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *simpleTableIdentifier = @"SimpleTableItem";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
                                  reuseIdentifier:simpleTableIdentifier];
}
cell.textLabel.text = @"Hi";
cell.detailTextLabel.text = @"Hi again!";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;发布于 2014-12-09 06:26:40
确保您的表格单元格宽度适合屏幕。您是以编程方式创建UITableView,还是在nib中创建?如果以编程方式创建,请检查表视图的框架大小,也可以在这里共享代码。
发布于 2014-12-09 07:10:53
从您的xib / storyboard的table view cell中选择附件类型。

https://stackoverflow.com/questions/27370670
复制相似问题