The SwiftUI Form view gives the ability to organsise views how you need them. Forms are typilcally used on settings pages and other similar places. In this tutorial we’ll look at using a Form and how to nest a TextField, Picker, and DatePicker.
Deciding wether to use a Form or a List, for example, depends on what you need. A Form is typically used for smaller amount of organised views, like a settings page, although you can iterate within a Form and show many items. One example could be that your profile has tags with your achievements in. You could get your achievements from Swift Data, and then iterate over them in a Form.
There are no hard and fast rules on what to choose, so please do experiment to see what provides the correct look for your application.
[Read more…]