Mar 29


This post will discuss how we can add a headerView to a UITableView and customize it.

For Basics refer my previous posts

The tableView will finally look like in the above figure. The headerView is the 30 pixel bar just below navigationBar and it reads “Last Synch …”
How you make a tableView can be found anywhere on Internet, so I ll assume that you know how to make a tableView.
Open the viewController in which you have created your table and add the following code in header file within the interface declaration:
UIView *myHeaderView;
Now open the viewController in which you have created your table and add the following code in implementation file
I have created a method that will create and customize the headerView. You can call this method from viewWillAppear method.
Comments will be appreciated, if you still face any difficulty in creating a headerView, leave a comment and I will be more than happy to address it.

9 Responses to “iPhone Tutorial: Customizing Header View”

  1. [...] iPhone Tutorial: Customizing Header View iPhone Tutorial: Adding a search bar in TableView Mar 29 [...]

  2. [...] Customizing Header View of table [...]

  3. [...] Customizing Header View of table [...]

  4. Brandon says:

    I cant’ seem to get to the previous post “Creating a UITableView Programatically”… i believe the page is down? All links to it point to the original “Navigating from one view controller to another” post

  5. philip says:

    could you post complete source code here? I tried to build on previous tutorials, but find i get lost here in this exercise. thanks.

  6. ABC says:

    Yes, Philip, sorry fr getting delayed, bt I founf that wid 3.0 things have changed a lil bit. ll be uploading all 2 src codes as soon as thy r done.

  7. ABC says:

    It may be coz I wrote that in the same post.

Leave a Reply

preload preload preload