Skip to content

Instantly share code, notes, and snippets.

@chriseidhof
Forked from steipete/LayoutPlayground.swift
Created February 20, 2021 16:43
Show Gist options
  • Save chriseidhof/0551660f9d0a362223f0a02ea41155f9 to your computer and use it in GitHub Desktop.
Save chriseidhof/0551660f9d0a362223f0a02ea41155f9 to your computer and use it in GitHub Desktop.
//: A Cocoa based Playground to present user interface
import SwiftUI
struct ContentView: View {
var body: some View {
HStack {
Text("Highlight :")
.background(Color.green)
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing)
.background(Color.yellow)
VStack(alignment: .leading) {
Text("Checkbox 111")
Text("Checkbox 2")
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
.background(Color.red)
}
.frame(width: 400, height: 200)
}
}
struct ContentView_Preview: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment