Parmeshwar
Parmeshwar

Reputation:

How to set iPhone Wallpaper Programmatically

I am developing an application in which I have to set image as the iPhone wallpaper (the background image on the "slide to unlock" screen). Do we have any API reference for this. Please help

Thanks in advance Parmeswar

Upvotes: 1

Views: 4095

Answers (2)

Sharanya
Sharanya

Reputation: 311

 NSString *str_mainMenu = [[NSBundle mainBundle] pathForResource:@"Unlock" ofType:@"jpg"];
    mainView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageWithContentsOfFile:str_mainMenu]];

Upvotes: 0

Liam
Liam

Reputation: 8092

Not presently, the only thing that you can do is save the image to the camera roll and give the user instructions on how to change their wallpaper using the new image.

Upvotes: 1

Related Questions