I have a table view with multiple sections. I want to display different section header titles and want to add a label on the right corner of each section at a right margin of 4px.
Can I implement both
- (NSString *)tableView:(UITableView *)iTableView titleForHeaderInSection:(NSInteger)iSection
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
to achieve this?
Only one of them will ever get called successfully.
tableView:viewForHeaderInSection:will get precedence.Define a view with a title label and another label that sits on the right corner and return it in
tableView:viewForHeaderInSection:with the values set.