I'm trying to add a custom image as a background for my application using Xcode 4.2, but I'm not too sure how to do it. I can add plain colors as the background in Interface Builder, but I do not see the option to add a custom image. I have Googled this issue and have researched it for hours, but none of the solutions have seemed to work for me and are out of date. I've read Apple's documentation, but it went over my head. I'm still a beginner when it comes to programming. Does anyone know of a simple way to set my custom image as the background for the UIView?
Thank you.
Use a UIImageView
that is the size of your views frame.
You could also use this Statement in Code.
[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"foo.bar"]]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With