保存图片到相册
//接口中定义这个方法,然后在实现类中实现他- (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *) contextInfo;//实现类中实现- (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *) contextInfo { NSString *message; NSString *title; if (!error) { title = @"成功提示"; message = @"成功保存到相"; } else { title = @"失败提示"; message = [error description]; } UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil]; [alert show]; [alert release];}//调用方法保存到相册的代码 UIImageWriteToSavedPhotosAlbum(img, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil); 1 楼 liuxing_iphone 2012-02-26 好东西呀,谢谢斑竹