2

我正在尝试在 swift 3中的EurekaUIViewController中构建一个自定义演示者行,当点击它时,会显示一个.

文档建议使用以下代码:

public final class CustomPushRow<T: Equatable>: SelectorRow<PushSelectorCell<T>, SelectorViewController<T>>, RowType {

    public required init(tag: String?) {
        super.init(tag: tag)
        presentationMode = .show(controllerProvider: ControllerProvider.callback {
            return SelectorViewController<T>(){ _ in }
            }, completionCallback: { vc in
                vc.navigationController?.popViewController(animated: true)
        })
    }
}

我将不得不替换SelectorViewControllerMyViewController. 但是现在它给出了以下错误(即使没有替换 UIViewController 名称):

无法将“ControllerProvider”类型的值转换为预期的参数类型“ControllerProvider<_>”

4

2 回答 2

2

为什么你不使用:

<<< ButtonRow("Rows") {
                $0.title = $0.tag
                $0.presentationMode = .segueName(segueName: "YourSegue", onDismiss: nil)
            }
于 2016-10-06T10:03:58.017 回答
2

该参数在 Eureka 的第 2 版completionCallback中更改为onDismiss

于 2016-11-15T14:26:55.670 回答