Post

Replies

Boosts

Views

Activity

Comment on SwiftUI Trap change of orientation
I was just trying to use a background image and get it to fit when the user rotates the device. But I have been at it for over a week now, and I can't get it to work, it is far too complicated, so I am just going to go with a plain white background. So thank you for all your help.
May ’24
Comment on SwiftUI: How do I detect a change in device orientation?
I tried this and I think I nearly understood it. In the XCode preview, it worked perfectly but when I ran it in the "Simulator" (iPhone 11 and iPhone 15) I got the following runtime error: SwiftUI/EnvironmentObject.swift:90: Fatal error: No ObservableObject of type OrientationInfo found. A View.environmentObject(_:) for OrientationInfo may be missing as an ancestor of this view. This seems to be referring to the line "Text("Orientation is ...." an
May ’24