Created
July 1, 2020 15:36
-
-
Save AlexPinhasov/6aa2d3ec6fc6476ee846ee73f9257e76 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 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