Hi,
It might be nice to be able to provide cells from a class instead of just from a nib, something like:
cellProvider = CellProvider(class: MyCustomCell.self)
However, as CellProvider isn't a protocol, this can't be done easily (it's also a struct so I can't hack a fix as a subclass).
how do you fix without nib to create cellProvider?
CellProvider is a generic type so we can specify it by coding...
cellProvider = CellProvider<MyCustomCell>()
Cell type is specified in row declaration as Eureka code below shows so it doesn't make sense to specify it again unless we use a xib file.
See the default cellProvider value:
open class Row<Cell: CellType>: RowOf<Cell.Value>, TypedRowType where Cell: BaseCell {
/// Responsible for creating the cell for this row.
public var cellProvider = CellProvider<Cell>()
Regards
Ah, if you don't specify a nibName it will initialise the class instead - that's exactly what I was after, thanks!
Please check #1460 when using nob files with generic cell type.