ReusableView
public protocol ReusableView : AnyObject
Defines a reusable collection or table view cell.
Subspec: Utility/ReusableView
func registerCell<T: ReusableView>(cellClass: T.Type) {
register(T.self, forCellWithReuseIdentifier: T.reuseIdentifier)
}
Used when registering and dequeuing reuseable cells and the identifier is the same as the class name.
-
reuseIdentifierDefault implementationDefault reuse identifier is set with the class name.
Default Implementation
Reusable identifier, used to dequeue cells and views.
Declaration
Swift
static var reuseIdentifier: String { get }
ReusableView Protocol Reference