要运行示例项目,请首先从GitHub克隆仓库,并在 Example 目录中运行 pod install
BSPhotoGallery 通过 CocoaPods 提供。要安装它,只需在您的 Podfile 中添加以下行
pod "BSPhotoGallery"
如果您在 podfile 中使用了 use_framework
只需这样
import BSPhotoGallery
在您需要使用它的每个文件中。
您还可以使用
@import BSPhotoGallery
在 桥接头文件 中,以避免为每个所需的文件导入框架。
let gallery = BSPhotoGallery(urls: urls).controller()
let gallery = BSPhotoGallery(images: images).controller()
present(gallery, animated: true)