views:

52

answers:

2

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?

A: 

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

Aaron Saunders
+1  A: 

See the allowsSelection property of UITableView.

myTableView.allowsSelection = NO;
imaginaryboy