iOS 15 rotation button display does not switch.

It worked fine up to the iOS 14, but from the iOS 15, the rotation button will be displayed, and switching of that button does not work, so please help.

I'm building an iPhone app on my iPad and watching it. When screen transition is performed using addChildViewController in the app, the display of the rotation button at the bottom right of the screen does not switch even if the screen transitions from the screen that allows rotation to the screen that does not allow rotation. The rotation button keeps appearing. Or it remains hidden.

In "supportedInterfaceOrientations" of the screen that does not allow rotation, it is set to "portrait", and when you press the rotation button, it will switch to the horizontal screen once and then return to the vertical screen, so you can see that the setting is reflected.

However, I want to switch the display of the rotation button at the timing of addChildViewController.

func show (UIViewController, sender: Any?)
func showDetailViewController (UIViewController, sender: Any?)
func present (UIViewController, animated: Bool, completion: (()-> Void)?)

If you perform a screen transition with these methods or "segue", the display of the rotation button will switch immediately. Therefore, it is considered that the display of the rotation button is not switched in addChildViewController.

Is it a bug? In the app I'm making, it's functionally impossible to switch from addChildViewController to present or show. Is there a way to switch the display of the rotation button in addChildViewController as well?

↓rotation buttan

note

・Confirmed with Xcode 13 beta 4 and iPad (OS 15) (simulator & iPhone).

・From iPad OS 15, we recognize that the screen remains vertical even if the terminal is rotated (new specifications).

Where exactly are those 2 buttons ? Are they specific to your app or system buttons ?

It is a button prepared by the system. If you build the iPhone app on your iPad, it will always be displayed in the lower right corner.

However, the number of buttons changes depending on the supportedInterfaceOrientationsFor setting of AppDelegate and the supportedInterfaceOrientations setting of the screen. There are not always two.

Found this tutorial. But I fear it is a bit too basic to solve your problem. h t t p s : / / w w w .guidingtech. com/top-ways-to-fix-auto-rotate-not-working-in-iphone/

Thank you for providing the information! I look the tutorial.

However, I'm hoping it will be fixed in the code and xcode settings, not the iPhone settings. But that's not the solution I was looking for. By the way, putting the app in the background and back to the foreground solves this problem and the screen shows the right number of buttons. What I want is to change to the right number of buttons without having to put them in the background.

iOS 15 rotation button display does not switch.
 
 
Q