2

I found this term in the What's New section of Xcode 11. Exactly what is the meaning of this here in the context of SwiftUI?

SwiftUI includes:
Design tools read and write the same code you edit by hand for a single source of truth

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Ravi Raja Jangid
  • 795
  • 9
  • 16

2 Answers2

2

With SwiftUI, you can either write the code programatically or use the design tool to edit the UI, which will also result in the SwiftUI code being modified. Essentially, you only have the source code, there's no separate design file (i.e. nib or Storyboard), which means that there is no way your UI design and the code handling the UI can ever get out of sync (which was the case previously with nib files or storyboards).

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
0

SwiftUI offers a declarative approach to user interface design. As you compose a hierarchy of views, you also indicate data dependencies for the views. When the data changes, either due to an external event or because of an action taken by the user, SwiftUI automatically updates the affected parts of the interface.

Vitalik Kizlov
  • 385
  • 5
  • 9