문제

In my DetailViewController i have the code

UPDATED x2

This is my setEditing

- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
    [super setEditing:editing animated:animated];
    [tableView setEditing:editing animated:YES];  //this line was added to force editing Mode
....

In my detailViewController I want to send tableView the 'magic/whatever it is' to register 'editing mode' to change the accessory, but I dont want to bring up the delete buttons. Previously I didnt have the line [tableView setEditing:editing animated:YES];, and so I only want it to bring up the accessory.

도움이 되었습니까?

해결책

You should definitely fix this.

When you create the table view cell (in tableView:cellForRowAtIndexPath:), set the accessoryType property to UITableViewCellAccessoryNone and the editingAccessoryType property to UITableViewCellAccessoryDisclosureIndicator.

You do this instead of implementing the deprecated tableView:accessoryTypeForRowWithIndexPath: method.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top