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, setEditing : and willTransitionToState , but this has not helped anymore.

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

 < Code> - (UITableViewCellEditingStyle) tableView: (UITableView *) tableView editingStyleForRowAtIndexPath: (NSIndexPath *) indexPath {return UITableViewCellEditingStyleNone; }   

Some comments tell you what you can do next.

  1. Add an additional view that is below the main view of your cell.
  2. Add a button on the scene to the place where the delete button was.
  3. Use a swipe signal identifier to create a basic swipe or a pan gesture identifier for dragging (general behavior).
  4. Update top view frame by translation

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -