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

Aug 22, 2008, 01:23 AM

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.

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.