测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | 2017年2月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✓ |
由 hryk224 维护。
用 Swift 编写的简单 iOS Instagram 照片浏览器。
import IPhotoBrowser
init(images: [UIImage], start index:Int)
init(imageUrls: [URL], start index:Int)
init(assets: [PHAsset], start index:Int)
func iPhotoBrowser(_ iPhotoBrowser: IPhotoBrowser, didChange index: Int)
// Present/Dismiss
@objc optional func iPhotoBrowserDidDismissing(_ iPhotoBrowser: IPhotoBrowser)
@objc optional func iPhotoBrowserDidCanceledDismiss(_ iPhotoBrowser: IPhotoBrowser)
// Push/Pop
@objc optional func iPhotoBrowserDidPop(_ iPhotoBrowser: IPhotoBrowser)
@objc optional func iPhotoBrowserDidCanceledPop(_ iPhotoBrowser: IPhotoBrowser)
/// This screenshot is used for pop transitions.
/// Used background image to IPhotoBrowser.
@objc optional func iPhotoBrowserMakeViewScreenshotIfNeeded(_ iPhotoBrowser: IPhotoBrowser) -> UIImage?
let photoBrowser = IPhotoBrowser(images: images.objects, start: indexPath.item)
photoBrowser.delegate = self
navigationController?.pushViewController(photoBrowser, animated: true)
or
present(photoBrowser, animated: true, completion: nil)
var iPhotoBrowserSelectedImageViewCopy: UIImageView? { get }
var iPhotoBrowserDestinationImageViewSize: CGSize? { get }
var iPhotoBrowserDestinationImageViewCenter: CGPoint? { get }
func iPhotoBrowserTransitionWillBegin()
func iPhotoBrowserTransitionDidEnded()
IPhoto
struct IPhoto {
let image: UIImage?
let imageUrl: URL?
let asset: PHAsset?
let title: String?
let description: String?
}
init(photos: [IPhoto], start index:Int)
本项目基于 MIT 许可证提供。有关详细信息,请参阅 LICENSE 文件。