SwiftUI: Difference between revisions

Content deleted Content added
Coel Jo (talk | contribs)
reference to MVVM
Coel Jo (talk | contribs)
Examples: citation
Line 34:
 
== Examples ==
The following is an example of a simple [["Hello, World!" program|Hello World]] program. It is standard practice in SwiftUI to separate the application struct and views into different structs, according to the [[Model–view–viewmodel|Model–View–ViewModel]] (MVVM) architectural pattern<ref>{{citationCite book needed|datelast=JanuaryHudson 2024|first=Paul |title=Swift Design Patterns |publisher=Paul Hudson |year=2018 |language=English}}</ref>.
<syntaxhighlight lang="swift">
import SwiftUI