PHCollectionList+Extension
2015-12-26 20:12
323 查看
// // PHCollectionList+Extension.swift // Photo // // CSDN:http://blog.csdn.net/y550918116j // GitHub:https://github.com/937447974/Blog // // Created by yangjun on 15/12/26. // Copyright © 2015年 阳君. All rights reserved. // import UIKit import Photos public extension PHCollectionList { /// 获取PHAsset集合 /// /// - parameter options : PHFetchOptions? /// /// - returns: [PHAsset] func fetchAssetsWithOptions(options: PHFetchOptions?) -> [PHAsset] { var assets = [PHAsset]() let fetchResult = PHAssetCollection.fetchMomentsInMomentList(self, options: options) fetchResult.enumerateObjectsUsingBlock { (obj: AnyObject, index: Int, umPointer: UnsafeMutablePointer<ObjCBool>) -> Void in if let assetCollection = obj as? PHAssetCollection { assets.appendContentsOf(assetCollection.fetchAssetsWithOptions(options)) } } return assets } }
其他
源代码
Swift文档修改记录
时间 | 描述 |
---|---|
2015-12-26 | 博文完成 |
版权所有
CSDN:http://blog.csdn.net/y550918116jGitHub:https://github.com/937447974/Blog
相关文章推荐
- zhihu的一个字符三维效果
- PHAssetCollection+Extension
- 干货!如何正确使用Git Flow
- 【郑轻】[1391]李白饮酒
- 5-1子集和问题
- Android 理解Window 和 WindowManager
- CentOS 6.7 编译安装Nginx 1.8.0
- 买书问题
- Android中的动画具体解释系列【1】——逐帧动画
- 算法设计题2.27-线性表-第2章-《数据结构习题集》-严蔚敏吴伟民版
- 【郑轻】[1224]画表格
- hdoj1213How Many Tables
- 函数(字符和字符串)
- 用FastQC检查高通量测序原始数据的质量
- 总结
- 美拍视频下载
- 【POJ】2823 Sliding Window
- 获取iframe节点元素里的document对象
- 对通信模型的疑惑
- linux软件包管理之三(源代码安装)