[Solved] How to stop or disable portrait/auto rotate app in ios swift?


Try this :

By User Interface
enter image description here

Programatically

Add this in appdelegate

func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
        return UIInterfaceOrientationMask(rawValue: UIInterfaceOrientationMask.landscape.rawValue)
    }

1

solved How to stop or disable portrait/auto rotate app in ios swift?