开发者

accessorytype of uitableview doesn't appear

开发者 https://www.devze.com 2023-03-11 00:49 出处:网络
I allowed selection in edit mode using allowsSelectionDuringEditi开发者_运维知识库ng = YES ; but at selection I want to add accessory the cell the problem is that the accessory doesn\'t appear

I allowed selection in edit mode using

allowsSelectionDuringEditi开发者_运维知识库ng = YES ;

but at selection I want to add accessory the cell the problem is that the accessory doesn't appear

I change it in cellForRowAtIndexPath

if (self.editing) {

    NSLog(@" Editing mode  ");

     cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;


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

I made sure that it enter the if statement because it display Editing mode

any suggestion


use

editingAccessoryType

instead of

accessoryType

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

0

精彩评论

暂无评论...
验证码 换一张
取 消