views:

863

answers:

1

I've implemented a custom view for my UITableView section headers (via viewForHeaderInSection). When in plain view mode, the default behavior seems to be that the cells float underneath the section headers and touch events fall through to the cells underneath.

How can I have the custom section header view respond first to any touch events inside its bounds and take some action, rather than passing the event to the cell underneath the section header view?

+3  A: 

Use an UIControl instead of an UIView with [aControl addTarget:action:forControlEvents:UIControlEventTouchUpInside];

catlan