标签:style color get cti name for
//创建
UIImagePickerController *imagePick = [[UIImagePickerController alloc] init];
imagePick.delegate = self;
imagePick.allowsEditing = YES;
imagePick.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePick.mediaTypes=[NSArray arrayWithObject:@"public.image"];
[self presentViewController:imagePick animated:animated completion:completion];
只需实现代理方法
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
// get the ref url
NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL];
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library assetForURL:assetURL resultBlock:^(ALAsset *asset) {
ALAssetRepresentation *imageRep = [asset defaultRepresentation];
NSLog(@"[imageRep filename] : %@", [imageRep url]);
NSLog(@"[imageRep filename] : %@", [imageRep filename]);
} failureBlock:^(NSError *error) {
}];
}
UIImagePickerController获取图片名,布布扣,bubuko.com
标签:style color get cti name for
原文地址:http://blog.csdn.net/dengmeiyu/article/details/35273281