ios - How to remove delete button when editing UITableViewCell? -
I want to customize my cell behavior - I want to change the cell view and show different buttons. Half of the work was found - when I want to hit it out loud, I get a scene to take.
But I have the button on the right side of the room, I want to use a custom button instead of getting rid of it. What should I use to remove it and I can force my button to do the same thing?
I tried to use two methods, If I leave calling the original method in any of these, I can not find the Delete button, but my view does not return to its original state after editing and other cells swipe What should I do to prevent this to stop the reaction? Editing: (BOOL) Animated: (BOOL) Animated ([Super-Setting: Animated Editing: Yes]; If (Editing) {[UIView Animation: 0.3 Animation: ^ {Self.parentView.transform = CGAffineTransformTranslate (CGFE Transform Identity, 100, 0);}];} and {{UIView Animavitthusion: 0.3 Animation: ^ {self.parentView.transform = CGAffineTransformIdentity;}};}} - (Zero ) WILLITRATIONSOSSTATE: (UITABLEWUELSTATEMASK) STATE [[Super Will TransitTostat: State]; if (= UITableViewCellStateShowingDeleteConfirmationMask) {[UIView animateWithDuration: 0.3 Animation: ^ {self.parentView.transform = CGAffineTransformTranslate (CGAffineTransformIdentity, 100, 0); {Self.parentView.transform = CGAffineTransformIdentity;}] Since your cell is a subclass of UITableViewCell, and you do not want to use share removal, you probably want to disable it. The bare basic method for any of the cells Any editing style will be used to go back Some comments tell you what you can do next. setEditing : and
willTransitionToState , but this has not helped anymore.
< Code> - (UITableViewCellEditingStyle) tableView: (UITableView *) tableView editingStyleForRowAtIndexPath: (NSIndexPath *) indexPath {return UITableViewCellEditingStyleNone; }
Comments
Post a Comment