I have an application with a navigation bar. When I click on a photo preview in my application, it displays the photo in full screen. But when I close the full screen, the view of my controller is under the navigation bar.
I saw on StackOverflow that it was necessary to add this line:
self.edgesForExtendedLayout = []
It works but it creates another bug. So I would like to know if there was another alternative?
UPDATE :
1- Make your navigation bar opaque.
2- If you are using Xib then check “Safe Area Layout Guides” in the File Inspector as shown below.
3- And if you want to do it programmatically then after adding on view