Created
June 19, 2018 05:46
-
-
Save jimmythai/cf94a9f714975a4eb24788354a58a0a1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Reusable: class { | |
| static var reusableIdentifier: String { get } | |
| } | |
| extension Reusable { | |
| static var reusableIdentifier: String { | |
| return String(describing: self) | |
| } | |
| } | |
| protocol NibReusable: Reusable { | |
| static var nib: UINib { get } | |
| } | |
| extension NibReusable { | |
| static var nib: UINib { | |
| let nibName = String(describing: self) | |
| return UINib(nibName: nibName, bundle: Bundle(for: self)) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment