UITableView cell selection disabled and UITableViewHeader Enabled
Posted
by
andyPaul
on Stack Overflow
See other posts from Stack Overflow
or by andyPaul
Published on 2012-09-02T02:17:48Z
Indexed on
2012/09/02
3:38 UTC
Read the original article
Hit count: 138
I am adding a my header view to
self.tableView.tableHeaderView=headerView;
This tableView has 10 cells.
I want to disable the cell Selection but, headerView touch events must be enabled.
To achieve this I added the following code:
self.tableView.userInteractionDisabled=YES;
self.headerView.userInteractionDisabled=NO;
self.headerView.exclusiveTouch=YES;
Where I am wrong?
Basic idea of implementation is , If headerView is enabled then cell selection is disabled and vice-versa.
© Stack Overflow or respective owner