Force Landscape when orientation is locked

Solutions Collect From Internet About “Force Landscape when orientation is locked”

Yes you can force it using this 2 lines of code, in your viewDidAppear

    let value = UIInterfaceOrientation.landscapeLeft.rawValue
    UIDevice.current.setValue(value, forKey: "orientation")