Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

caldwelljason

macrumors member
Original poster
Jul 9, 2008
44
2
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?
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.