我有一个 View Controller ,它打开一个模态视图 Controller ,供用户从其库中选择图像。为此,我使用了我编写的 DKImagePickerController
的 Rx 包装器。
ViewController中的相关代码如下:
fileprivate func addPicturesFromLibrary() {
guard let viewModel = self.viewModel else { return }
let pickerController = DKImagePickerController()
pickerController.singleSelect = false
pickerController.maxSelectableCount = 10
pickerController.showsCancelButton = true
pickerController.sourceType = .photo
pickerController.rx.didSelectAssets()
.debug("
欢迎光临 OStack程序员社区-中国程序员成长平台 (http://ostack.cn/)
Powered by Discuz! X3.4