News for hackers. Stuff that matters.
Re:SwiftUI tutorials rewritten completely by wlesieutre on Monday December 14, 2020 @11:46PM (#25427103)
It can draw stuff directly rather than going through UIKit. Example via WWDC by Sundell: https://wwdcbysundell.com/2019/swiftui-relationship-to-uikit...

  struct ContentView: View {
      var body: some View {
          VStack {
              ForEach(0..<3) { _ in
                  HStack {
                      Text("Leading")
                      Text("Trailing")
                  }
              }
          }
      }
  }
> Looking at the above code sample, it’s easy to jump to the conclusion that the resulting UI will consist of a vertically aligned UIStackView — which’ll then contain a set of horizontally aligned, nested stack views, which in turn each will contain two labels rendered using UILabel. However, none of those assumptions are actually true — as SwiftUI instead draws our labels directly using the private CGDrawingView class.

There are no comments on this comment yet.