Reputation: 6451
I allowed selection in edit mode using
allowsSelectionDuringEditing = 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
Upvotes: 1
Views: 576
Reputation: 1916
use
editingAccessoryType
instead of
accessoryType
More details at http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITableViewCell_Class/Reference/Reference.html
Upvotes: 5