-tableView:commitEditingStyle:forRowAtIndexPath: useless but needen when using UITableViewRowAction
| Originator: | Christian.Lobach | ||
| Number: | rdar://20346674 | Date Originated: | 30-Mar-2015 |
| Status: | Closed | Resolved: | 10-Jun-2015 |
| Product: | iOS SDK | Product Version: | 8.2 (12D508) |
| Classification: | Other Bug | Reproducible: | Always |
Summary: For `UITableViewRowAction`s to work, you have to implement the `UITableViewDelegate` method `-tableView:commitEditingStyle:forRowAtIndexPath:` in order for the buttons to appear. This method is never called (because committing the row actions happens in the block of the row action itself), but has to be implemented (even empty). This is nowhere described in the documentation. `-tableView:editActionsForRowAtIndexPath:` should not require `-tableView:commitEditingStyle:forRowAtIndexPath:` to be implemented. See the attached Sample project for a working implementation and one that should work, but doesn't. Steps to Reproduce: 1. Create a UITableViewController 2. Implement `-tableView:editActionsForRowAtIndexPath:` 3. Do NOT implement `-tableView:commitEditingStyle:forRowAtIndexPath:` Expected Results: Cells are swipable, revealing the actions returned from `-tableView:editActionsForRowAtIndexPath:` Actual Results: Cells are not swipable Version: iOS 8.2 (12D508) Notes: See attached Sample Project Configuration: iPhone 6 64GB, iOS Simulator Attachments: 'RowActionBugDemo.zip' was successfully uploaded. http://cl.ly/1Y06363H0m1h
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!