Set image as wallpaper

Discussion in 'iOS Programming' started by Binju, Feb 15, 2010.

  1. Binju macrumors member

    Joined:
    Jan 31, 2010
    #1
    I want to save image on the photoalbum and save it as a wallpaper?

    I wrote code for saving image,

    Code:
    UIImage *birdimage = [UIImage imageNamed:@"Bird1.jpg"];
    	    NSData * imageData = UIImagePNGRepresentation(birdimage);
    		UIImage *theImage = [UIImage imageWithData:imageData];
    		UIImageWriteToSavedPhotosAlbum(theImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
    		
    		
    		
    		
    		UIImagePickerController * picker = [[UIImagePickerController alloc] init];
    		picker.delegate = self;
    		
    		
    			
    		
    		[self presentModalViewController:picker animated:YES];
    		[picker setAllowsImageEditing:YES]
    How to set the picked image as wallpaper
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I'm pretty sure there is no API in the SDK to do this.
     

Share This Page