How to save a UIImage

- by
    // let's save our image as a JPG
    NSData *imageData = UIImageJPEGRepresentation(chosenImage, 1);
    // get our home directory and add the save path and file name
    NSString *imagePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/myImage.jpg"];
    // then write the file to disk
    [imageData writeToFile:imagePath atomically:YES];

Add your voice!

This site uses Akismet to reduce spam. Learn how your comment data is processed.