标签:io ar sp for on log bs cti 代码
已经获取到了 分享下代码
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
if(picker.sourceType == UIImagePickerControllerSourceTypePhotoLibrary){
//UIImage *image= [info objectForKey:UIImagePickerControllerOriginalImage];
NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL];
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library assetForURL:assetURL
resultBlock:^(ALAsset *asset) {
NSDictionary* imageMetadata = [[NSMutableDictionary alloc] initWithDictionary:asset.defaultRepresentation.metadata];
NSDictionary *GPSDict=[imageMetadata objectForKey:(NSString*)kCGImagePropertyGPSDictionary];
NSLog(@"%@",GPSDict);
NSLog(@"%@",imageMetadata);
/* GPSDict 里面即是照片的GPS信息,具体可以输出看看*/
}
failureBlock:^(NSError *error) {
}];
}
}
标签:io ar sp for on log bs cti 代码
原文地址:http://www.cnblogs.com/rankilau/p/4146737.html