func show() {
let config = XTAssetsConfiguration()
config.maxminumCount = 5
config.numberOfColum = 3
self.presentAssetsPicker(configuration: config, delegate: self)
}
func didFinishPickingAssets(assets: [PHAsset]) {
self.datas.append(contentsOf: assets)
self.tableView.reloadData()
}
- Add
pod 'XTAssetsPicker'
to your Podfile. - Run
pod install
orpod update
. - import XTAssetsPicker.