UIImageを写真アルバムに保存する簡単な方法。
// 保存するメソッド
- (void) save {
UIImage *image = [self.canvasView UIImage];
SEL sel = @selector(savingImageIsFinished:didFinishSavingWithError:contextInfo:);
UIImageWriteToSavedPhotosAlbum(image, self, sel, NULL);
}
// 保存完了を通知するメソッド
- (void) savingImageIsFinished:(UIImage *)_image
didFinishSavingWithError:(NSError *)_error
contextInfo:(void *)_contextInfo {
UIAlertView *alert =
[[UIAlertView alloc] initWithTitle:@"End"
message:@"image save completed"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}