Eureka: SelectorRow documentation is corrupt
How to develop a Custom Presenter row in Eureka 4.x? The offocial documentation is still
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 }
}, onDismiss: { vc in
_ = vc.navigationController?.popViewController(animated: true)
})
}
}
but this couldn’t get compiled.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 16
So, you’re getting this, because with recent changes, SelectorRow is more specialized (select from list of options) and the functionality just to present a custom TypedRowControllerType is now lost. Try using This row as base, should work:
ps. It will be a great idea to have a such a row in Eureka.
If anyone needs help implementing @mspasov base row, here’s how I’ve done it:
In your code try removing CustomViewController as in the following code
You should get through the initial error, but then you may find another issue in regards to a type mismatch. This did work on some similar methods for me, but currently I am blocked by an error:
I’m not sure yet what is wrong with my implementation. On the line with presentationMode = .show(… I get this error:
Cannot convert value of type ‘ControllerProvider<MapViewController>’ to expected argument type ‘ControllerProvider<_>’
If anyone has some insight to what I am doing wrong that would be awesome.
I’m facing a similar problem. After following the hints from issue #776, I’m still getting the error messages below: Type ‘CustomPushRow’ does not conform to protocol ‘TypedRowType’ Type ‘CustomPushRow’ does not conform to protocol ‘Taggable’ Type ‘CustomPushRow’ does not conform to protocol ‘RowType’ Type ‘CustomPushRow’ does not conform to protocol ‘BaseRowType’ Generic type ‘SelectorRow’ specialized with too many type parameters (got 2, but expected 1)
My code: