我有一个应用程序,它将图像存储到iphone中相册中的自定义库。将图像保存到自定义库
我叫ALAssetLibrary
以下功能-(void)saveImage:(UIImage*)image toAlbum:(NSString*)albumName withCompletionBlock:(SaveImageCompletion)completionBlock
{
//write the image data to the assets library (camera roll)
[self writeImageToSavedPhotosAlbum:image.CGImage orientation:(ALAssetOrientation)image.imageOrientation
completionBlock:^(NSURL* assetURL, NSError* error) {
//error handling
if (error!=nil) {
completionBlock(error);
return;
}
//add the asset to the custom photo album
[self addAssetURL: assetURL
toAlbum:albumName
withCompletionBlock:completionBlock];
}];
}
在我SaveImage IBAction为
-(IBAction)saveToLib:(id)sender
{
UIImage *savedImage = imgPicture.image;
NSLog(@"Saved Image%@",savedImage);
[self.library saveImage:savedImage toAlbum:@"Touch Code" withCompletionBlock:^(NSError *error) {
if (error!=nil) {
NSLog(@"Big error: %@", [error description]);
}
}];
}
,但我的应用不断得到坠毁 帮我出 由于提前
上发言出发的NSLog – WaaleedKhan 2012-04-05 16:43:29
无法识别的选择发送到实例 – WaaleedKhan 2012-04-05 16:47:04
请告诉您的完全崩溃日志... – Aravindhan 2012-04-05 16:47:54