Skip to content

Instantly share code, notes, and snippets.

@dmlebron
Created August 2, 2018 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmlebron/1e889a2fc10cea45986ac16e06d25a40 to your computer and use it in GitHub Desktop.
Save dmlebron/1e889a2fc10cea45986ac16e06d25a40 to your computer and use it in GitHub Desktop.
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