Skip to content

About

An example project how to use SwiftData with a NavigationSpliView

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

SwiftData Categories Items

  • Item has a name
  • Category has a name and icon

All Items view

  • Seperate View to see all saved items
  • The category name is shown small underneath

Category view

  • Each category uses this view
  • shows all items stored in it

Item view

  • shows the details from the item
    • It's name and category
    • only exists to show how to use a seperate view for it

Edit/Delete

  • Menu on category/item
  • Only deleted after confirming the alert
  • editing with a sheet
    • cancel/save buttons
    • saving disabled when no name
    • when editing items the category can be changed

Other features

  • As it uses SwiftData the categories and items are saved persistent
  • Model confirms now to CloudKit (iCloud sync)
  • App icon uses the icon file (OS 26+)
  • Xcode Previewes using sample data to see how it would look in the app
    • works using SampleData.swift
    • and sample data in both models (Item, Category)
    • then each view needs the sample data on its preview

About

An example project how to use SwiftData with a NavigationSpliView

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages