uitableview的accessorytype没有出现

时间:2011-06-08 09:56:21

标签: iphone ipad

我允许使用

在编辑模式中进行选择

allowsSelectionDuringEditing = YES;

但在选择时我想添加附件单元格,问题是附件没有出现

我在cellForRowAtIndexPath

中更改它
if (self.editing) {

    NSLog(@" Editing mode  ");

     cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;


}
else {
    // cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator ; 
}

我确保它输入if语句,因为它显示编辑模式

任何建议

1 个答案:

答案 0 :(得分:5)

使用

<强> editingAccessoryType

而不是

<强> accessoryType

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITableViewCell_Class/Reference/Reference.html

的更多详情