Guest User

Untitled

a guest
Jun 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. protocol Reusable: class {
  2. static var reusableIdentifier: String { get }
  3. }
  4.  
  5. extension Reusable {
  6. static var reusableIdentifier: String {
  7. return String(describing: self)
  8. }
  9. }
  10.  
  11. protocol NibReusable: Reusable {
  12. static var nib: UINib { get }
  13. }
  14.  
  15. extension NibReusable {
  16. static var nib: UINib {
  17. let nibName = String(describing: self)
  18. return UINib(nibName: nibName, bundle: Bundle(for: self))
  19. }
  20. }
Add Comment
Please, Sign In to add comment