Closed 3lvis closed 8 years ago
I figured to use generics with UITableViewCell
and NSManagedObject
I need to initialize the DATASource
as a container of this types like this:
DATASource<T: UITableViewCell, U: NSManagedObject>
But is not possible to do such things if you have to inherit from NSObject
DATASource<T: UITableViewCell, U: NSManagedObject>: NSObject
I need to inherit from NSObject
because this is implementing a UITableViewDataSource
and doing that has the requirement of implementing at least NSObjectProtocol
.
Before:
After: