I attach the video of my issue. When i click on anywhere in viewcontroller navigation bar is appear
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.setNavigationBarHidden(true, animated: true)
self.navigationController?.isNavigationBarHidden = true
self.navigationController?.hidesBarsOnTap = true
}
The above code added on viewwillappear its working on initially but when I click anywhere on screen navigationbar is appear.
SceneDelegate
? – HallowedAppDelegate
, where you have defined yourNavigationController
? – HallowednavigationController.setNavigationBarHidden(true, animated: false)
– Hallowedself.navigationController?.hidesBarsOnTap = true
This causes the navigation bar to show when you tap the content area of the screen. Please have a look at the documentation of the UINavigationController. It states the following: "When the value of this property is true, the navigation controller toggles the hiding and showing of its navigation bar and toolbar in response to an otherwise unhandled tap in the content area." – Ensollself.navigationController?.hidesBarsOnTap = true
If you write this then it's going to happen. Is there any specific reason behind adding that? – Bolshevist