Hacker News new | ask | show | jobs
by Delphiki 1833 days ago
There is no way to create the UI visually in SwiftUI, only programmatically. I find SwiftUI substantially easier to write than Swift or Objective-C, and feel like it actually requires less use of Xcode's functionality than either of its predecessors.
1 comments

Hmm? From https://developer.apple.com/xcode/swiftui/ :

> Xcode includes intuitive design tools that make building interfaces with SwiftUI as easy as dragging and dropping. As you work in the design canvas, everything you edit is completely in sync with the code in the adjoining editor. Code is instantly visible as a preview as you type, and any change you make to that preview immediately appears in your code. Xcode recompiles your changes instantly and inserts them into a running version of your app — visible, and editable at all times.

Aha, what I was looking for was the "Library" popup, which allows drag-and-drop of new components onto the canvas. Now I understand; this latest iteration of Xcode has the code <-> canvas being bidirectional, so using the library or canvas inspector just edits your code anyway! Interesting. I'll have to run through some docs and tutorials to see if I can finally pick up macOS/iOS app development.