I hide UINavigationBar on homepage, and show on next page.
If top view is not colorful, pop to home page may perfect.
But top view is colorful, navigation bar will flash.
You can as follow gif, first is not correct, second is correct.
I just use system methods
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
}