News for hackers. Stuff that matters.
Re:SwiftUI in 2022 by BakaRakuda on Saturday May 28, 2022 @01:35PM (#31542156)
I'm late to the party, but how about this:

  struct ContentView: View {
    var body: some View {
      ZStack {
        Color.red
        Color.blue
          .frame(width: 50, height: 50)
          .padding(10)
        Color.blue
          .frame(width: 50, height: 50)
          .position(x: 50/2, y: 50/2)
          .padding(10)
      }
      .aspectRatio(1, contentMode: .fit)
      .padding(10)
    }
  }

There are no comments on this comment yet.