views:

125

answers:

2

I am new to iphone development.I want to change the color of the title to brown.In default it is in gray color.To display the title i am using the following method.

- (NSString *)tableViewUITableView *)tableView titleForHeaderInSectionNSInteger)section {


return @"Title";
}

I want to change the title backgound color.

please help me out.Thanks.

+2  A: 

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

Could be the method you're looking for.

natanavra
Thanks now i got it
Warrior
+3  A: 

You will have to create a UIView subclass that closely represents what is provided by default. Then change the color of your label. Then you can implement:

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

Which should return your custom view.

Matt Long
Thanks now i got it
Warrior