1

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 ?

aelam
  • 2,796
  • 2
  • 27
  • 32

1 Answers1

0

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

aelam
  • 2,796
  • 2
  • 27
  • 32