Post

Replies

Boosts

Views

Activity

Comment on SwiftUI List and ForEach
@AnnArborMark Thanks that seems to have done the job nicely, I have read and re-read the page you suggested, and I am still unsure what the "id:.self" does, but as it works I will just use it as you have suggested.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
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
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Comment on SwiftUI NavigationLink destination
@DTS Engineer I have studied this for several hours and had a play with this. But I don't see how this solves my problem I am sure I am missing something, but I still end up trying to convert a String to a View.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Comment on SwiftUI List and ForEach
@AnnArborMark Thanks that seems to have done the job nicely, I have read and re-read the page you suggested, and I am still unsure what the "id:.self" does, but as it works I will just use it as you have suggested.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Comment on SwiftUI Picker Label
Thanks @Claude31, I am not surprised, why would anything do what its documentation says it will?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on Swift: Navigation link not working.
@BabyJ , you are a genius, you have come to my rescue once again! Thank you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI Trap change of orientation
@BabyJ It is always the simple solutions that work, Thank you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI Orientation Change
@BabyJ That worked thank you so much. But now whenever I try to pick up the value envOrient.myOrient in the ContentView the App Crashes. What am I doing wrong now:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI: How do I detect a change in device orientation?
Claude31, I give up it was just too difficult, I think a plain white background will do nicely.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI - Determining Current Device and Orientation
How would I use this lovely and simple solution to detect an orientation change?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
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
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI How can dertine what device I am running
Thank you Quinn, that was most helpful and solved it for me.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on Swift: Can I change views without clicking on a link.
dakkpaw, you are a genius thank you for an excellent answer.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI How can dertine what device I am running
Thank you darkpaw, but I need this to work on an iMac as well as iOS devices, and "UIDevice" is part of "UIKit" which won't work on OSX. I think I need a SwiftUI solution.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftUI How can dertine what device I am running
Thank you Claude31, I have tried that but it won't work on an iMac. I think I have to have a solution using SwiftUI
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on SwiftData relationships
Sorry Claude which tutorial?
Replies
Boosts
Views
Activity
May ’24