How can the ability to select cells in a Cocoa Touch TableView be completely disabled?
I have managed to get my code to a state where selection seems not possible, but if you hold your finger on a cell for a moment or two it will turn blue (selected) until you move off it.
How can it be completely disabled?
If you want to disable selection for just some of the cells, use: cell. userInteractionEnabled = NO; As well as preventing selection, this also stops tableView:didSelectRowAtIndexPath: being called for the cells that have it set.
To hide UITableViewCell separator completely, simply set it's colour to UIColor. clearColor(). This will make the cell separator not visible.
deselectRow(at:animated:) Deselects a row that an index path identifies, with an option to animate the deselection.
A view that presents data using rows in a single column.
See the allowsSelection property of UITableView.
myTableView.allowsSelection = NO;
from the apple documentation on Gesture Recognizers
Generally, a window delivers UITouch objects (packaged in UIEvent objects) to a gesture recognizer before it delivers them to the attached hit-test view. But there are some subtle detours and dead-ends in this general delivery path that depend on whether a gesture is recognized. You can alter this delivery path to suit the requirements of your application.
so... I haven't actually implemented this, but have done some reading on it... It might be a possible solution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With