Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't know of any way to "move the delete button 10px to the left". However, you can animate the custom contents of your table cell around the static position of the unmovable delete button by listening for the <code>willTransitionToState:</code> message from a <code>UITableViewCell</code> sub-class see <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewCell_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006938-CH3-SW27" rel="nofollow noreferrer">here</a>.</p> <p>To quote the docs:</p> <blockquote> <p>Subclasses of UITableViewCell can implement this method to animate additional changes to a cell when it is changing state. UITableViewCell calls this method whenever a cell transitions between states, such as from a normal state (the default) to editing mode. The custom cell can set up and position any new views that appear with the new state. The cell then receives a layoutSubviews message (UIView) in which it can position these new views in their final locations for the new state. Subclasses must always call super when overriding this method.</p> </blockquote> <p>What you are looking for is the <code>UITableViewCellStateShowingDeleteConfirmationMask</code> value. This is one of those times where creating UITableViewCell subclass might be better, so from the controller you are just creating an instance of your custom cell. Then the cell can just adjust itself like <code>animateLeft</code> and <code>animateRight</code> and handle the inner workings of adjusting its own subviews.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload