PDA

View Full Version : Setting wallpaper?




tsornin
Sep 4, 2008, 10:09 AM
Is there a way for my app to allow the user to change their wallpaper? I'd like to include some images in my app and let the user choose one for their default wallpaper image.



robbieduncan
Sep 4, 2008, 10:12 AM
No: a user can only alter their wallpaper through the official settings app.

tsornin
Sep 4, 2008, 10:39 AM
No: a user can only alter their wallpaper through the official settings app.

Drat. What about saving an image from my app to their camera roll (or photo library)?

robbieduncan
Sep 4, 2008, 10:41 AM
Drat. What about saving an image from my app to their camera roll (or photo library)?

I've no idea: read the documentation to see if this is possible.

Edit to add: I'd say no. Access to the photo library is via the UIIMagePickerController (http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/occ/cl/UIImagePickerController) which does not provide any way to write to the library.

depl0y
Sep 21, 2008, 03:21 AM
If you can get your image in an UIImage object, you can use the following code:

UIImageWriteToSavedPhotosAlbum(yourUIImageObject, nil, nil, nil);

That adds your image to the photo library. You should check out the documentation on what all parameters do.