Post

Replies

Boosts

Views

Activity

Reply to How do I access an environment object from within a non-View Class?
I simply needed to pass over some data that was received via Multipeer Connectivity so I just stuffed the received values into UserDefaults and was able to retrieve them from my View.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Convert a PhotosPickerItem to an Image in SwiftUI on MacOS
I found that by processing the image as in the previous code I can simply display the image by var name: // code here //this displays the image that was picked from the PhotosPicker vm.bgImage .resizable() .frame(width: 200, height: 200) .scaledToFit() .opacity(vm.bgOpacity) .scaledToFit() //code here
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Convert a PhotosPickerItem to an Image in SwiftUI on MacOS
Thanks for the reply. I went ahead and just implemented drag and drop on MacOS and that seems to work fine. I did get the PhotosPicker to run on iOS, so I will use it there.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23