title: ContentInset automatically changed after popViewController
body: <p>I have a 2 viewController</p>
  
  <ul>
  <li><p>itemViewController</p></li>
  <li><p>chatViewController</p></li>
  </ul>
  
  <p>I had tapped right barButton to show the chatViewController</p>
  
  <p>After that</p>
  
  <p>I had tapped backButton to return to the itemViewController</p>
  
  <p>It works fine....except of the one problem.</p>
  
  <p>When I back to the itemViewController...then It automatically changed tableView's contentInset</p>
  
  <p><strong>itemViewController snippet code is here</strong></p>
  
  <p>in viewDidLoad function</p>
  
  <pre><code> tableView.rowHeight = UITableViewAutomaticDimension
          tableView.estimatedRowHeight = 450
  
          tableView?.contentInset = UIEdgeInsetsMake(22, 0, 0, 0)
  </code></pre>
  
  <p>I had set contentInset because My app has custom navigation bar Height which is bigger then default navigation bar height.</p>
  
  <p><a href="https://i.stack.imgur.com/6rqp6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6rqp6.png" alt="enter image description here"></a></p>
  
  <pre><code>func chat(_ sender: UITabBarItem){
  
          var chattingObjId = String()
  
  
      //STEP 1. is Created Chatting Room?
      PFCloud.callFunction(inBackground: "getChattingObjId", withParameters:
          ["postId":results.objectId, "from":PFUser.current()?.username!], block: { (response: Any?, error:Error?) in
  
              // some your code
              if error == nil {
  
                  chattingObjId = response as! String
                  print("\(chattingObjId) : Received from Server")
  
                  let chatting = self.storyboard?.instantiateViewController(withIdentifier: "ChattingVC") as! ChattingVC
  
                  chatting.chattingObjId = chattingObjId
  
  
                  self.navigationController?.isNavigationBarHidden = false
                  self.navigationController?.pushViewController(chatting, animated: true)
  
  
              }else {
                  print(error?.localizedDescription as Any)
              }
  
  
      })
  
  }
  </code></pre>
  
  <p><strong>chatViewController's snippet code below</strong></p>
  
  <pre><code>func back(_ sender: UITabBarItem){
  
      //push back
      _ = navigationController?.popViewController(animated: true)
  
  
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/iNHaS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iNHaS.png" alt="enter image description here"></a></p>
  
  <p>After tapped back button then .... </p>
  
  <p><a href="https://i.stack.imgur.com/0Ay1W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Ay1W.png" alt="enter image description here"></a></p>
  
  <p>There is gaps... It seems to be... 22pt which is I had set viewDidLoad..</p>
  
  <p>Why It is happened?</p>
  
  <p><a href="https://i.stack.imgur.com/Kb8qs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kb8qs.png" alt="enter image description here"></a></p>
  
  <p>Here is my settings of itemViewController.</p>