1

On pressing the comment icon its loading and pushing CommentController to the Navigation stack.

let storyboard = UIStoryboard(name: "Main", bundle: nil)
    let controller = storyboard.instantiateViewController(withIdentifier: "CommentsVC") as! CommentsController
    controller.post = post
    self.navigationController?.pushViewController(controller, animated: true)

Strange thing is that NavigationBar is perfect in first screen. HomeFeed(first screen) is embedded in the navigationController using storyboard.

Illustration:

GetMe4GetMe
  • 927
  • 1
  • 7
  • 12
  • Can you pls highlight which gap you are talking about ? – torap Dec 15 '17 at 16:16
  • torap, i have highlighted the image. i am talking about the black gap on the top of commentController. NavigationBar is not attached to the top of the screen like homeFeed screen NavigationBar. – GetMe4GetMe Dec 15 '17 at 22:49

1 Answers1

0

This is because the navigation bar in iOS11 iPhoneX does not reach the top.

You can turn it white by doing window?.backgroundColor = UIColor.white in your app delegate.

However, I would suggest reviewing your hierarchy. This shouldn't happen in this case.

Victor
  • 222
  • 1
  • 6
  • 15