NibLoadable.swift 371 B

12345678910111213141516171819202122
  1. //
  2. // NibLoadable.swift
  3. // LoopKit
  4. //
  5. // Created by Nate Racklyeft on 7/2/16.
  6. // Copyright © 2016 Nathan Racklyeft. All rights reserved.
  7. //
  8. import UIKit
  9. protocol NibLoadable: IdentifiableClass {
  10. static func nib() -> UINib
  11. }
  12. extension NibLoadable {
  13. static func nib() -> UINib {
  14. return UINib(nibName: className, bundle: Bundle(for: self))
  15. }
  16. }