Background image for a table

Discussion in 'iOS Programming' started by caldwelljason, Aug 12, 2008.

  1. caldwelljason macrumors member

    Jul 9, 2008
    Any ideas how I can get a background image on my UITableViewController? I am using grouped view and would like a custom background for the space between the cells.

    I can see how to set the background for a cell. I can see how to set it for a textbox, of all things. But I can't seem to set it for my view.

    I thought of creating a UIImageView and adding it to the subviews of the window and then setting the background color of the tableView to clearColor. That didn't work. I've been working all around that angle, adding my UIImageView at various places, setting the background color on the window, the view (view self.view in the controller) and the tableView, all to no avail.

    Any thoughts?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    You could just implement custom cells for alternate rows, and turn off the table's internal separators. Then in these custom separator cells you could draw your image (assigning these rows a smaller height). I do something similar and it works great.

Share This Page