//
//  DezignableHiddenNavigationBar.swift
//  Pods
//
//  Created by Daniel van Hoesel on 02-03-16.
//
//

import UIKit

public protocol DezignableHiddenNavigationBar {
  var navigationBarHidden: Bool { get set }
}

public extension DezignableHiddenNavigationBar where Self: UIViewController {
  public func setupHiddenNavigationBar() {
    self.navigationController?.navigationBarHidden = self.navigationBarHidden
    self.automaticallyAdjustsScrollViewInsets = !self.navigationBarHidden
  }
  
  public func resetHiddenNavigationBar() {
    self.navigationController?.navigationBarHidden = false
    self.automaticallyAdjustsScrollViewInsets = true
  }
}
//
//  DezignableHiddenNavigationBar.swift
//  Pods
//
//  Created by Daniel van Hoesel on 02-03-16.
//
//

import UIKit

public protocol DezignableHiddenNavigationBar {
  var navigationBarHidden: Bool { get set }
}

public extension DezignableHiddenNavigationBar where Self: UIViewController {
  public func setupHiddenNavigationBar() {
    self.navigationController?.navigationBarHidden = self.navigationBarHidden
    self.automaticallyAdjustsScrollViewInsets = false
  }
  
  public func resetHiddenNavigationBar() {
    self.navigationController?.navigationBarHidden = false
    self.automaticallyAdjustsScrollViewInsets = true
  }
}
--- 
+++ 
@@ -15,7 +15,7 @@
 public extension DezignableHiddenNavigationBar where Self: UIViewController {
   public func setupHiddenNavigationBar() {
     self.navigationController?.navigationBarHidden = self.navigationBarHidden
-    self.automaticallyAdjustsScrollViewInsets = false
+    self.automaticallyAdjustsScrollViewInsets = !self.navigationBarHidden
   }
   
   public func resetHiddenNavigationBar() {
Fix issue with scroll inset for hidden nav bar
