UITableViewCells built with AutoLayout constraints in Editing mode with Disclosure Indicator

Originator:sohail
Number:rdar://15263423 Date Originated:Oct 18, 2013
Status:Open Resolved:
Product:iOS7 SDK Product Version:5A1413
Classification: Reproducible:YES
 
Summary:
The presence of a disclosure indicator in editing mode means that when the Delete Access button is tapped, some of the interior cell contents shift. The layout change can be treated with indifference.

However, the problem occurs when that Delete of a table cell is not confirmed, but rather, cancelled. The rightmost item in the table cell, which has a trailing space to containing view constraint, never moves back into original position. 

Furthermore, attempts to correct layout are exacerbated by the fact that canceling when the delete button is exposed, does *not* trigger the state change methods on UITableViewCell that were expected:

1. – willTransitionToState:
2. – didTransitionToState:

The attached Xcode project is an Apple sample code project, where I have modified the table cell in the Storyboard to have a disclosure indicator accessory (in both editing and non editing modes). The View Controller is set to editing mode in viewDidLoad.

Steps to Reproduce:
Run the project as is, to see the effect:

1. Select a table cell and hit the red delete circle on the left, to expose the Delete confirmation button.
2. Tap a different cell's red delete circle to dismiss (cancel) the delete option on the first cell
3. Notice how the rightmost graphic in the table cell originally selected for delete, never returns to its original position.
4. View the logs. When the delete confirmation is not acted upon, but rather, backed out of, neither transition to state methods on the table cell (mentioned in the description above), ever fire.


Expected Results:
The interior contents of the table cell should either:
1. Not move at all (relative to the disclosure indicator)
OR
2. Return to their original layout prior to the delete confirmation being exposed

Furthermore, both of the following methods should fire as the delete confirmation is canceled:

1. – willTransitionToState:
2. – didTransitionToState:


Actual Results:
1. The interior table cell contents don't return to their original position after canceling the delete confirmation
2. The transition to state methods never fire (at this cancelation step)

Version:
7.0.2 / 5A1413

Notes:


Configuration:
Latest Xcode 5 SDK, running in the iOS7 simulator

Original Attachments:
'4_TableViewCellSubviews.zip' from sample code, modified as described above. Available here: https://app.box.com/s/cbd0il8uhs2iyq5pyj4o

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!