I have a viewcontroller with button "close" which is located on the navigation bar place. That's how it looks:
The code where I hide navigation bar:
self.navigationController!.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationController!.navigationBar.shadowImage = UIImage()
self.navigationController!.navigationBar.isTranslucent = true
navItem.setHidesBackButton(true, animated: true)
The button is visible but touch up event doesn't work. If I move button below navigation bar area everything works fine.
I tried :
self.navigationController!.navigationBar.isUserInteractionEnabled = true
self.navigationController!.navigationBar.isExclusiveTouch = false
Unfortunately, it didn't help. How can I fix this issue?