Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

4 votes
1 answer
328 views

How to pass data to a sub View from a SwiftData query

I'm learning Swift through a project. I'm creating an app where the user can create multiple accounts and register transactions within each account. The models and views that are relevant to my ...
bluprince13's user avatar
  • 4,819
0 votes
0 answers
29 views

Open NavigationLink from Local Notification in NavigationStack iOS17

The Notification provides the uuid corresponding to the Item saved in SwiftData. Goal is to open the correct DetailItem View when I tap the notification. How can I achieve this? @Model final class ...
Tezzus's user avatar
  • 21
2 votes
2 answers
1k views

SwiftData - using @Query with a filter predicate does not work as expected

I am using SwiftData & SwiftUI. This is the rough setup of my code: struct ListItemView: View { @Environment(\.modelContext) var modelContext @Query private var items: [Items] @...
Rajiv Nair's user avatar