Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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))
- }
- }
Add Comment
Please, Sign In to add comment