Hide navigation bar in viewWillAppear instead of viewDidAppear.