UITableViewCell's willTransitionToState: and didTransitionToState: do not fire when canceling deletion
| Originator: | guillaume.algis | ||
| Number: | rdar://16633772 | Date Originated: | 16-Apr-2014 05:36 PM |
| Status: | Open | Resolved: | |
| Product: | iOS7 SDK | Product Version: | 7.1 |
| Classification: | Other | Reproducible: | Always |
Summary: When canceling the deletion of a cell while the table view is in editing mode, the methods `willTransitionToState:` and `didTransitionToState:` of the cell are not called. The attached project exhibit this bug by implementing a custom subclass of UITableViewCell logging calls to `willTransitionToState:` and `didTransitionToState:`. Steps to Reproduce: Run the attached project: 1. Add a cell to the table view with the '+' button 2. Set the table view to editing mode with the 'Edit' button 3. Tap the delete button (red minus button) of the cell 4. Cancel the deletion by tapping anywhere in the table view Expected Results: `willTransitionToState:` and `didTransitionToState:` are each called 3 times: - one time when tapping the 'Edit' button, with a state value equal to UITableViewCellStateShowingEditControlMask; - one time when tapping the red minus button, with a state value equal to UITableViewCellStateShowingEditControlMask | UITableViewCellStateShowingDeleteConfirmationMask; - one time when canceling the deletion, with a state value equal to UITableViewCellStateShowingEditControlMask; Actual Results: `willTransitionToState:` and `didTransitionToState:` are each called only 2 times: - one time when tapping the 'Edit' button; - one time when tapping the red minus button. The methods are not called when canceling the deletion. We are never made aware that the cell state returned to UITableViewCellStateShowingEditControlMask. Version: iOS 7.1 Xcode 5.1.1 (5B1008) Notes: The methods are called just fine when canceling a "swipe to delete" (ie. the table view is not in editing mode). Partial duplicate of http://openradar.appspot.com/15263423 Related question on StackOverflow: https://stackoverflow.com/questions/20119323
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!
Closed as "Duplicate of 14645370 (Closed)"