PDA

View Full Version : How to add backGround image to UIView???




sspbond007
Aug 22, 2008, 01:23 AM
Hi,

I have completed my view, but now in last i decided to add an background image.I tried it using UIImageView, but if I add this it hide all the content of view. It doesn't go in background.
I also tried this from interface builder,I set background property,but nothing changed.
Please help me,how can I add background image to view after adding some content to view??? Or I need to add image first then redo my all work.
Thanks



grimjim
Aug 22, 2008, 03:49 AM
Thirty seconds' browsing through the documentation reveals that UIView has a method called sendSubviewToBack: which may be worth a try. Add your UIImageView to your main view, as you do now, and then call the main view's sendSubviewToBack: method, passing it the UIImageView as its parameter.