import Foundation import Rswift protocol ReusableNibTableViewCell: NibInstantiable { static var reuseIdentifier: IdentifierType { get } } extension ReusableNibTableViewCell where NibResourceConcreteType: ReuseIdentifierType, NibResourceConcreteType.ReusableType == Self { /// Default implementation. Rswift's cell nib structs conform to `ReuseIdentifierType` with an associated type that matches Self /// So we can know at runtime that this reuse identifier matches this cell, and cells can conform to `ReusableNibTableViewCell` just by /// conforming to `NibInstantiable` static var reuseIdentifier: IdentifierType { return self.nibResource } }