Problem with the UINavigationController button in landscape mode?

my iphone application supports portrait mode before, now I want to also support landscape mode.

everything works perfectly in my application, except for the navigation controller control button. I used tableviews in the navigaton navigator, when I press the back button in landscape mode, a popup appears and loads its previous view, but the animation is weird.

I gave the default animation, but in landscape mode, the animation is turned upside down, instead of leaving the ritual by default when I press the back button.

Has anyone encountered such a problem ??? thanks in advance.

+3
source share
1 answer

I understood the problem, and below is the solution ... each view control that I click on the navigation controllers should have the following delegation method.

each view controller must confirm that it supports orientation changes

  • (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation {self.orientation = interfaceOrientation; return YES; }
+6
source

Source: https://habr.com/ru/post/1750127/


All Articles