Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
protocol ObjectInfoable: NSObjectProtocol {}
extension ObjectInfoable {
static var fileName: String {
return String(describing: Self.self)
extension ObjectInfoable where Self: UIView {
static var nibName: UINib {
return UINib(nibName: fileName, bundle: nil)
static var reuseIdentifier: String {
return self.fileName
extension NSObject: ObjectInfoable {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment