Feroz Feroz - 4 years ago 145
Objective-C Question

How to add image and title to header of table view IOS

In table view I have created header.

What is the correct way to set image or title in tableView's header? What I need to do?


Neo Neo
Answer Source

In the method

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

you need to create a UIView and add other views like UIImageView(for image), UILabel(for title) and return the UIView at last.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download