Reputation: 2154
I am trying to build a custom presenter row in Eureka in swift 3, which when tapped, shows a UIViewController
.
The documentation suggests the following code:
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)
})
}
}
where I will have to replace SelectorViewController
with MyViewController
. But right now its giving following error (even without replacing the UIViewController name):
Cannot convert value of type 'ControllerProvider' to expected argument type 'ControllerProvider<_>'
Upvotes: 2
Views: 725
Reputation: 557
The parameter completionCallback
was changed to onDismiss
in version 2 of Eureka.
Upvotes: 2
Reputation: 21
why you don't use:
<<< ButtonRow("Rows") {
$0.title = $0.tag
$0.presentationMode = .segueName(segueName: "YourSegue", onDismiss: nil)
}
Upvotes: 2