首页 > 其他 > 详细

通过UIImagePickerController选取的图片名称信息

时间:2017-01-13 20:53:42      阅读:168      评论:0      收藏:0      [点我收藏+]

 - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { 

    NSURL *imageURL = [info valueForKey:UIImagePickerControllerReferenceURL];

    ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset)    {

        ALAssetRepresentation *representation = [myasset defaultRepresentation];

        weakSelf.imageName = [representation filename];

        NSLog(@"imageName : %@",weakSelf.imageName);

    };

    ALAssetsLibrary *assetslibrary = [[ALAssetsLibrary alloc] init];

    [assetslibrary assetForURL:imageURL resultBlock:resultblock failureBlock:nil];

通过UIImagePickerController选取的图片名称信息

原文:http://www.cnblogs.com/Milo-CTO/p/6283376.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!