xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.78k stars 1.33k forks source link

PushRow: how to push other viewcontroller #2120

Open ShawEw opened 3 years ago

ShawEw commented 3 years ago

how to use PushRow to push custom viewcontroller? should I define customRow? image

mats-claassen commented 3 years ago

PushRow needs the controller to be a SelectorViewController. If your controller is a subclass you could be able to make it work by setting the type of provider to ControllerProvider<SelectorViewController<...>> or maybe by just putting everything in one line Swift infers the types correctly.

If your view controller is not a subclass then you might have to create a row as subclass from OptionsRow to avoid depending on SelectorViewController. Or maybe you could use a ButtonRowWithPresent