Posts

Showing posts from July, 2013

How to set Custom Section Header in UITableView for ios sdk version greater than 6

Image
Dear Friends, As we know, that to set a custom Section Header in a TableView we need to call the following. Here we pass our own custom View. But, remember the view which we returned was never reusable, hence not memory efficient. -( UIView *) tableView:( UITableView *)tableView viewForHeaderInSection:( NSInteger )section Later version of iOS , starting from iOS 6, helps to make our code Memory efficient with few lines of code. Still here the delegate method remains the same. With the help of this tutorial we will be able achieve a Custom Header implementation using iOS 6 or greater sdk. We will be creating a app. which would look like as shown below. Please use the following steps to achieve this: Step 1: Create a .xib file for the custom header 1. Press command + N 2. Select User Interface in Left Pane. 3. Then Select a View and name it as TableHeader. Step 2: Create a Custom class for the custom header in Step 1 1. Press command