OGeek|极客世界-中国程序员成长平台

标题: ios - RxSwift PublishSubject 无意中被丢弃 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 15:52
标题: ios - RxSwift PublishSubject 无意中被丢弃

我有一个 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("





欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4