// // NAPublishAlbumTableViewController.swift //// // Created by on 2019/3/23. // Copyright © 2019年 . All rights reserved. // import UIKit import Photos typealias HandlePhotos = ([PHAsset], [UIImage]) -> Void class HandleSelectionPhotosManager: NSObject { static let share = HandleSelectionPhotosManager() var maxCount: Int = 0 var callbackPhotos: HandlePhotos? private override init() { super.init() } func getSelectedPhotos(with count: Int, callback completeHandle: HandlePhotos? ) { // 限制长度 maxCount = count < 1 ? 1 : (count > 9 ? 9 : count) self.callbackPhotos = completeHandle } } /// 后期可用来对相应的英文文件夹修改为汉语名,暂时未使用 enum AlbumTransformChina: String { case Favorites case RecentlyDeleted = "Recently Deleted" case Screenshots func chinaName() -> String { switch self { case .Favorites: return "最爱" case .RecentlyDeleted: return "最近删除" case .Screenshots: return "手机截屏" } } } /// - albumAllPhotos: 所有 /// - albumSmartAlbums: 智能 /// - albumUserCollection: 收藏 enum AlbumSession: Int { case albumAllPhotos = 0 case albumSmartAlbums case albumUserCollection static let count = 2 } class NAPublishAlbumTableViewController : UITableViewController{ // MARK: -原文地址:https://www.cnblogs.com/xjf125/p/10595168.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。