Changing color of section header in UITableview?

You need to implement this method in the UITableViewDelegate protocol.

You need to implement this method in the UITableViewDelegate protocol: - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section Here is a link to the documentation ... and do something like this (sub in your own color): UIView *section = UIView alloc initWithFrame:CGRectMake(0, 0, tableView.bounds.size. Width, 22) autorelease; section setBackgroundColor:UIColor blackColor; return section; You can also use the section integer to alternate colors or something similar. I think the default height for the sections is 22, but you can make it whatever you want.Is this what you meant by your question?

Hope this helps.

Thanks, I thought there would some kind of trigger in IB to switch to black color. But anyway, thanks. – Simon D.

Mar 5 '10 at 22:20 1 But please, cache those views. There is bug in UIKit causing to ask for header views when the tableView is being scrolled, so this method will get called for every pixel-offset while scrolling. 22px is indeed the default height.

– Joost Mar 5 '10 at 22:25.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions