I am listening for existing orientation changes by using UIDevice.orientationDidChangeNotification, but is there a way to lock a SwiftUI View into a particular orientation?
I do not want to introduce AppDelegate.
Example:
import SwiftUI
struct TestView: View {
var text: String
var body: some View {
Text(text)
}
}