UITableView: set different background colors for header and the table

Discussion in 'iOS Programming' started by youPhone, Feb 17, 2009.

  1. youPhone macrumors member

    Sep 8, 2008
    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?
  2. johnnyjibbs macrumors 68030


    Sep 18, 2003
    London, UK
    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...

Share This Page