Failed to process UIInterfaceOrientationPortraitUpsideDown to view Controller for iPad

In my iPad app, I have a tabbarController for the firstView, for the tabbarController I added a button, when we click on it, one view controller will appear. My problem is that when I try to turn this viewcontroller into PortraitUpsideDown, it did not go to PortraitUpsideDown. The code that I use in this viewController is

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Overriden to allow any orientation.
return(interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);

// returns YES; }

}

Can someone tell me what mistake I made or add something there. Thank.

+3
source share

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


All Articles