PDA

View Full Version : How do I add a background to a list view




boyplunder
Mar 14, 2009, 05:48 PM
I have a straight forward list based app in progress. I would like to add a background image to the tableview, but can't see how to do it. The tableviews are in IB.

Any pointers will be most welcome.



fishkorp
Mar 14, 2009, 07:49 PM
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 Safari/525.20)

Ibthink what you do is add the bg image to the view, then put the table view on to if that and make the background transparent. I can't confirm because I'm not at my computer. I think that's what I did though.

boyplunder
Mar 16, 2009, 10:07 AM
Thanks for that,

I was using the default tableview in the Root view controller that didn't allow me to add anything behind it. I have now changed it to a window with a tableview, and an imageview behind it. Still having problems though. Let me explain what I have.

The views are all in IB and start with the default Main window nib. This has a view that displays the RootViewController nib where my list is. This all works without issue or error. On the RVC I can assign the image to the imageview and set the transparency of the tableview to 0%. In IB it looks great, but when I build the app to see it in the iPhone sim, the settings are ignored and I just see the white list as usual. I've tried cleaning the targets, but no change.

I have played with transparency in both the main window and RVC, but nothing seems to work. It looks like the MV is overriding the RVC.

Any suggestions?