Q:

How do I change the background image of my iPhone app?

I have looked around and found some code which so called chooses an image from an array of image objects, but cant find an explanation.
I would like to make my app have a background image and the user can select next and previous buttons to scroll through some full screen images, setting them as the background image as they scroll.
I know how to do this in java, but cant seem to do it for this app.
How or what code is linked to a next button to grab the next image in the array and reverse for the back button? 
Then that needs to be displayed obviously.
I have used a layered architecture with a MVC style approach but cant seem to put it together with Objective-C.
Would the buttons call the appropriate methods of the so called delegates, which the delegates handle fetching and returning the Images? 
Would the buttons use the returned images and actually handle the redrawing?
I would really appreciate the help.
Regards
Jarryd

A:

Extend the answer by syoleen.
NSArray * names = [NSArray arrayWithObjects:@"file1.png" @"file2.png",@"file3.png",nil];
int r=rand()%([NSArray count]);
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:[names objectAtIndex:r]]];

(this is from memory so might have few typos)

