PDA

View Full Version : UITableView: set different background colors for header and the table




youPhone
Feb 17, 2009, 04:13 PM
I would like to set my background color for my UITableView to white and set my tableViewHeader backgroundColor to grayColor similar to the facebook app. When I bounce scroll my table so that you can see above the header, then currently it is white above the header view. I want that to be brown instead.

In the facebook app, above the headerview, it is a blue color and below the table is a white color. If i try and set the UITableView backgroundColor to brown, then the top will be brown, but so will the bottom. Additionally, all of the unset cells will have a brown background instead of white.

Any help with this?



johnnyjibbs
Feb 19, 2009, 10:42 AM
Sorry I can't help but I'm also looking for a similar thing. I guess the potential solution may be to attach some sort of view to the back of the table, and then set the background colour to the desired colour at the top but that sounds archaic and there must be something more simple...