Created
August 2, 2018 15:02
-
-
Save dmlebron/1e889a2fc10cea45986ac16e06d25a40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol CellRegistrable { | |
static var identifier: String { get } | |
static var nib: UINib { get } | |
} | |
extension CellRegistrable { | |
/// Defaults value to the name of the class | |
static var identifier: String { | |
return String(describing: Self.self) | |
} | |
static var nib: UINib { | |
return UINib(nibName: identifier, bundle: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment