I am using SwiftUI and Swift in my application. Few screens are expected to support both landscape or portrait orientation.
In Swift, i am using below code to support landscape and portrait orientation
UIDevice.current.setValue(NSNumber(value: orientation), forKey: "orientation")
UINavigationController.attemptRotationToDeviceOrientation()
But i don't know how to do landscape orientation in SwiftUI.