Adding A Background Image In Interface Builder Adding A Background Image In Interface Builder xcode xcode

Adding A Background Image In Interface Builder


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"]]];


Just drag-and-drop the image from Finder to the extreme left pane of your Xcode window (where the list of files is shown). Now open your xib file and locate the image in your media library. Just drag-and-drop the image from the media library to your view. Adjust the size of the image as you need.