支持网络图,本地图,UIImage同时使用
支持网络图片加载
支持图片放大缩小
支持双击放大指定位置
支持滑动查看及横屏切换图片
支持当前页/总页数显示
支持单击关闭
支持长按弹出功能窗口
支持自定义功能增加
支持图片数据的延时加载
支持没有数据,占位图占位
支持非物理横屏看图
Demolet browser = LLPhotoBrowserViewController.init(photoArray: data currentIndex: indexPath.row) // 模态弹出 browser.presentBrowserViewController()图片正常浏览检测设备横屏swift let browser = LLPhotoBrowserViewController.init(photoArray: data, currentIndex: indexPath.row, sheetTitileArray: ['分享给朋友','保存到相册']) { (index) in print(index) } // 模态弹出 browser.presentBrowserViewController()Action Sheet检测设备横屏 Action SheetUpdate请使用最新版本 1.0.1
版本信息更新描述1.0.1 增加支持网络图,本地图,UIImage同时使用
HTTPString, UIImage, 文件名称String
1.0.0 * 项目初始化
CocoaPods
支持CocoaPods
pod 'LLPhotoBrowser' Usage对象封装(见Demo里LLCollectionViewController.swift)var data: [LLBrowserModel] = [] for index in 0..<bigUrlArray1_0_1.count { let cell: LLCollectionViewCell? = collectionView.cellForItem(at: IndexPath.init(row: index, section: 0)) as? LLCollectionViewCell let model = LLBrowserModel.init() model.data = bigUrlArray1_0_1[index] if let c = cell { model.sourceImageView = c.ll_imageView } data.append(model) }简单的图片浏览let browser = LLPhotoBrowserViewController.init(photoArray: <#数组([LLBrowserModel])#>, currentIndex: <#当前索引(row)#>) // 模态弹出 browser.presentBrowserViewController()支持长按弹出AcitonSheet工具let browser = LLPhotoBrowserViewController.init(photoArray: <#数组([LLBrowserModel])#>, currentIndex: <#当前索引(row)#>, sheetTitileArray: <#工具菜单标题([String])#>) { (<#点击工具菜单下标#>) in // 点击事件处理 print('ActionSheet点击-->下标=\(index)') } // 模态弹出 browser.presentBrowserViewController()支持类型,论文,你可以这么玩/// 1.0.1版本 数据源 let bigUrlArray1_0_1: [Any?] = [ '', // 文件名称 'timg', 'timg-1', // URL '', '', // UIImage UIImage.init(named: 'timg-5'), UIImage.init(named: 'timg-7'), // URL '']Example示例代码见LLCollectionViewController.swift
Issues如果使用过程中,有什么问题欢迎issues。
github地址:
https://github.com/LvJianfeng/LLPhotoBrowser
,开题报告