views:

52

answers:

2

I was wondering if it was possible to set the IPhone's background image from an App. I have an image which is a UIImageView. Like when the phone is locked theres the "wallpaper background image." Is there a way to make a button which can set the wallpaper of the phone as my UIImageView?

+1  A: 

In your background view (you might have to drag an IBOutlet to it) say like:

imageView.bounds = view.bounds;
imageView.hidden = YES;
[view addSubview:imageView];

Then when your button is pressed (possibly an IBAction) do this to turn the background on and off.

if (imageView.hidden){
   imageView.hidden = NO;
}else{
   imageView.hidden = YES;
}
Justin Meiners
I'm sorry I mean like the Wallpaper on the iphone, like when the phone is locked and you see a custom wallpaper, I can adjust the question to reflect this
Pete Herbert Penito
Oh my bad. Not possible without a jailbreak.
Justin Meiners
+1  A: 

I adjusted my google search to "wallpaper" terminology and I found this:

http://www.iphonedevsdk.com/forum/iphone-sdk-development/36103-can-sdk-app-change-wallpaper-iphone.html

It appears this is only possible on a jailbroken iphone.

Pete Herbert Penito