ViewControllerDesignable.swift 490 B

1234567891011121314151617181920
  1. //
  2. // Created by Jake Lin on 12/14/15.
  3. // Copyright © 2015 IBAnimatable. All rights reserved.
  4. //
  5. import UIKit
  6. public protocol ViewControllerDesignable: class {
  7. var hideNavigationBar: Bool { get set }
  8. }
  9. public extension ViewControllerDesignable where Self: UIViewController {
  10. func configureHideNavigationBar() {
  11. navigationController?.isNavigationBarHidden = hideNavigationBar
  12. }
  13. func resetHideNavigationBar() {
  14. navigationController?.isNavigationBarHidden = false
  15. }
  16. }