I am making a grid view. It subclasses tableview and lays out multiple subcells (columns) per cell. That’s all working fine.
Now, I need to detect when an individual sub-cell is tapped. I have overriden touchesEnded in the grid view. Is there a way I can take that NSSet of UITouch objects and detect whether it was a touch up inside or some other gesture?
I could write custom code, but it might be hard to get it perfect.
UIControlEventslikeUIControlEventTouchUpInsideare used withUIControlobjects. In aUIViewyou’ll need to do your own testing.Now I don’t know how you’ve structured your grid view, or exactly what kind of touches you want to detect, but normally you need to have something like this. This looks for a single tap and what cell was tapped.