On iOS 13, pushing a view controller using segue such as "Show" causes supportedInterfaceOrientations not to be called on presented view controller(VC2). As a result, the controller autorotates to portrait mode even though supportedInterfaceOrientations returns only .landscape. However, if we push another view controller(VC3) from this controller(VC2) via any segue, VC3 does not autorotate.
The only workaround I have found is presenting VC2 as modal view controller using modal presentation style fullScreen. This is not I want on iPad devices, so looking for the reason why it is happening this way on iOS 13 and a fix.
func application(UIApplication, supportedInterfaceOrientationsFor: UIWindow?) -> UIInterfaceOrientationMask. Asks the delegate for the interface orientations to use for the view controllers in the specified window. enum UIInterfaceOrientation. Constants that specify the orientation of the app's user interface.
plist->supporting interface orientation.
You have to set the 'presentation style' on the view controller to Full Screen, then the supportedInterface override will get called.
or check out this for even more info
How to present a modal atop the current view in Swift
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With