views:

1023

answers:

3

I want to have a single custom section header, with the rest being the default header.

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
return ???;
}

What do I return to just give the default header view?

+2  A: 

The default header view is nil, for no header at all!

notnoop
Thanks :) turns out it was crashing because of something else I was doing.
Zac Altman
A: 
Dave DeLong
A: 

As Saeed says, the default return value is "nil".

If you want a view in place, you can alloc a custom view within that method and make it return that view.

For example, if you want a picture as the header for that section, you should do something like:

[view addSubview:pictureView];

return view;

This will return that view for the section whose index you passed in.

Chintan Patel