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
You can simply add a UIButton to your header view (or your header view can be a UIButton itself).
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
static NSString *cellIdentifier = @"cellIdentifier";
UITableViewCell *cell = (UITableViewCell*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
UIButton *cellButton = (UIButton*)[cell viewWithTag:1];
[cellButton addTarget:self action:@selector(premiumSectionClicked:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
-(void)buttonTapped:(id)sender{
}