UITableViewDelegate method didDeselectRowAtIndexPath is not called when cell was selected using cell.setSelected()
| Originator: | matthias.hochgatterer | ||
| Number: | rdar://25460922 | Date Originated: | 31-Mar-2016 11:16 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | |
| Classification: | Reproducible: |
Summary: A table view can be configured to show the checkmark on the left side of a UITableView cell and the user can select multiple cells. A cell can be selected by the user (tapping on the row), by calling `tableView.selectRowAtIndexPath(..)` or `cell.setSelected(true, ...). If the cell is selected by calling `cell.setSelected(true)`, the user cannot deselect the cell anymore. If the cell is selected by calling `tableView.selectRowAtIndexPath()`, the user can deselect the cell as expected. Steps to Reproduce: 1. Create a table view 2. Select a cell by calling `cell.setSelected()` 3. Tap on the selected cell Expected Results: The table view should deselect the cell and `tableView(didDeselectRowAtIndexPath:)` should be called Actual Results: The cell cannot be deselected by tapping on the cell. Version: iOS 9 Notes: Configuration: iPhone Simulator Attachments: 'UITableViewControllerSelection.zip' was successfully uploaded.
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!