ALAsset是什么?
来源:互联网 发布:淘宝客白菜qq群推广 编辑:程序博客网 时间:2024/06/03 16:19
最近有工作要推荐,iOS工程师,要找工作的同学加微信公众账号:iOSDevTip
获得的ALAsset对象就是相片对象:其中有相片的缩略图,全屏图,高清图,url等属性。
ALAsset *result = [assets objectAtIndex:index];
获取url:
String类型:
NSString *url = [[[result
defaultRepresentation]url]description];
URL类型:
NSURL *url = [[result defaultRepresentation]url];
获取缩略图:
CGImageRef ref = [result thumbnail];
UIImage *img = [[UIImage alloc]initWithCGImage:ref];
获取全屏相片:
CGImageRef ref = [[result defaultRepresentation]fullScreenImage];
UIImage *img = [[UIImage alloc]initWithCGImage:ref];
获取高清相片:
CGImageRef ref = [[result defaultRepresentation]fullResolutionImage];
UIImage *img = [[UIImage alloc]initWithCGImage:ref];
0 0
- ALAsset是什么?
- ALAsset
- ALAsset类
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset 相册的使用
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ALAsset和ALAssetRepresentation详解
- ios ALAsset和ALAssetRepresentation详解
- 用ALAsset获取相册原图
- OC -- ALAsset和ALAssetRepresentation相册详解
- ALAssetsLibrary,ALAssetsGroup,ALAsset,ALAssetRepresentation用法详解
- AdditionQuiz
- Unity3D入门 :给物体增加刚体属性
- 谁说C语言很简单?---from coolshell
- Linux 下安装配置 JDK7
- java生成可执行文件
- ALAsset是什么?
- ruby on rails 4 中利用 remote:true 实现 ajax ,小记
- jQuery.validate插件
- VI(VIM) using
- ImageLoader must be init with configuration before using 错误解决方法
- 控制台文字矩阵、菱形排列(充分展示用逻辑替代内循环的处理技巧)
- 面试题-交通灯
- Mahout推荐算法API详解
- android 布局 控件 焦点冲突问题