In ObjC the code would be like
self.tableModel = [[NIMutableTableViewModel alloc] initWithDelegate:(id)[NICellFactory class]];
In Swift
self.tableModel = NIMutableTableViewModel(delegate:NICellFactory.classForCoder())
In Swift, It gives me error AnyClass does not conform to NITableViewModelDelegate
. In fact the class NICellFactory doesn't and can't conform to the protocol NITableViewModelDelegate Explicitly.
Is there an alternate way ?
Guys who want the solution can see this issue details https://github.com/jverkoey/nimbus/issues/577
And this is swift port https://github.com/NimbusKit/swift
Relevant code here: TableCellFactory.swift