Hacker News new | ask | show | jobs
by BakaRakuda 1913 days ago
You can literally create the app described in his quote in about 2 minutes flat with the following lines of code...

  import SwiftUI

  @main
  struct FooApp: App {
 @State private var isClicked: Bool = false
 var body: some Scene {
  WindowGroup {
   VStack {
    Button("Click me!") { isClicked.toggle() }
    if isClicked { Text("Hello, World!") }
   }.frame(width: 640, height: 480)
  }
 }
  }
1 comments

Even in the objc-cocoa days, you could create a .xib, drag a few connections, and have this working with 10 lines of code (8 of which generated automatically by XCode)