1
1

【SwiftData】Query with dynamic properties in a View

Posted at

結果を表示する子 View にて。

struct UserListView: View {
  @Query var users: [User]
  
  init(sort: SortDescriptor<User>) {
    _users = Query(sort: [sort])

こういうことですか。

🧑🏻‍💻 参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1