Skip to content

Instantly share code, notes, and snippets.

struct ContentView: View {
let tree = Root([
Foo(0, [Bar("a"), Bar("b")]),
Foo(1, [Bar("c"), Bar("d")])
])
@trochoid
trochoid / DiscloseLayout.swift
Created October 30, 2022 00:57
How to make a disclosure view only as wide as possible with left aligned title and centered content?
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 10) {
Text("this is the default")
VStack {
HStack {
var what = "hmm"