How to make UITableView Header selectable?
问题 I have made a custom section-header for UITableView, that includes some controls like segmented control, UIImageView ,etc. It successfully appears, but it's not tappable so I can't interact with its controls. I need to know how can I make this header view selectable? 回答1: There is no way to do it with the UITableViewDelegate. You have to add a UITapGestureRecognizer to yourHeaderView Like: UITapGestureRecognizer *singleTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action