I have some problems with using a UITableView on a UIView which haves a UITapGestureRecognizer. If I click on a UITableViewCell, the background does not change to the selected one (because no touch is received).
I was in the assumption that if you add a childview to a parentview, the childview would be able to handle the touch and that everything would still work. However, this is not the cas. If I tap on a UITableviewCell, the tap is handled by this parentview and the cell is not selected.
I already tried to subclass "UITapGestureRecognizer" to ignore touch events from UITableViewCell: (monotouch code)
public override bool ShouldReceiveTouch (UIGestureRecognizer recognizer, UITouch touch)
{
if (touch.View.GetType () == typeof(UITableViewCell))
return false;
return true;
}
It's not working because of I click on a cell, "touch.View.GetType ()" returns "UIView" and it's ignored.
Any idea's how I can make my tableview working on a UIView with a UITapGestureRecognizer?
If I remove the "UITapGestureRecognizer" from the parentview, the tableview acts normal.
Thanks Matt