Post

Replies

Boosts

Views

Activity

Comment on can't use @Environment for Binding?
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Comment on SwiftData Query relationships not working
Do you mean Xcode 15?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23
Comment on How to form a search predicate using swift data with a one to many model
You're very welcome. It's always nice to help others out and you always learn things along the way. Apple doesn't always know what we developers are thinking which is why feedback is so important. Hopefully, SwiftData gets better because if it's anything like SwiftUI's introduction then a lot of people will be happy. Good luck with your predicates!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23
Comment on Print amount from single member instance on dynamic view
Glad I could help. Can you mark an answer as correct to close this thread and so others know your issue has been solved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Print amount from single member instance on dynamic view
Where do you know how many elements you have? You must have a variable or something that you can use to create the array with that many items and pass to the ForEach.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Migrating from the Observable Object protocol to the Observable macro
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on can't use @Environment for Binding?
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Binding with ForEach or List doesn't work anymore when using @Observable macro
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on can't use @Environment for Binding?
Using @Bindable could be better as you would have to create this new Binding for every property you need to access. We are still in beta you must remember: things could change.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Pass @Query filter predicate from parent view in SwiftData
Make sure your SWDItem and SWDPackage classes are both marked with the @Model macro. Also, you are force unwrapping item.package and maybe that is causing something, I'm not too sure. You might have to show some more code here because there isn't enough to debug the situation.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Missing parameter error in the first couple of steps
Can you please close this thread by marking an answer as correct so that others know your issue has been solved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Section collapse triangle for section header no longer supported with NavigationStack?
I think that’s only for Apple to see, so they can note or forward it on, as I can’t see others’ either.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on How to remove space before SwiftUI List Sections?
Not that I know of. I’m assuming you tried the iOS 15 solution on iOS 16?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Calculation for a Picker
If that solved your problem, can you please mark that post as being correct, therefore closing this thread and letting everyone else know the issue has been resolved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on NavigationStack suggestions
This has always been the case since iOS 13.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on Hyperlinks open in Web browser instead of embedded WKWebView using Swift5/SwiftUI
If you mean comma, then no it doesn't. The commented part should be a boolean value of whether the URL should be opened in Safari. It's probably not clear enough in the sample code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22