Note that there are some explanatory texts on larger screens.

plurals
  1. POwriteImageToSavedPhotosAlbum:metadata:completionBlock:
    primarykey
    data
    text
    <p>I use the method writeImageToSavedPhotosAlbum:metadata:completionBlock: save taken picture to photo album,code is:</p> <pre><code>-(void)savePhotoToAlbum{ CGImageRef imageRef=[imageView image].CGImage; NSDictionary *currentDic=[self getLocation]; NSDictionary *metadata=[NSDictionary dictionaryWithDictionary:currentDic]; ALAssetsLibrary *library=[[ALAssetsLibrary alloc] init]; [library writeImageToSavedPhotosAlbum:imageRef metadata:metadata completionBlock:^(NSURL *assetURL,NSError *error){ if(error == nil) { UIAlertView *alertView=[[UIAlertView alloc] initWithTitle:nil message:@"Save success!" delegate:nil cancelButtonTitle:@"Okay" otherButtonTitles:nil]; [alertView show]; [alertView release]; } else { UIAlertView *alertView=[[UIAlertView alloc] initWithTitle:nil message:@"Save failure!" delegate:nil cancelButtonTitle:@"Okay" otherButtonTitles:nil]; [alertView show]; [alertView release]; } }]; [library release]; </code></pre> <p>} .The method getLocation that is get user's current location!That can save success!Then I want to pick taken picture from photo album use UIImagePickerController! Code is :</p> <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { if([picker sourceType]==UIImagePickerControllerSourceTypeSavedPhotosAlbum)//picker image delegate { NSString *mediaType=[info objectForKey:UIImagePickerControllerMediaType]; if([mediaType isEqualToString:@"public.image"]) { NSDictionary *metadata=[info objectForKey:UIImagePickerControllerMediaMetadata]; NSLog(@"%@",metadata); } } } </code></pre> <p>Then log the metadata is null.That's why? And how do I get the metadata info which I saved?Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload