Skip to content

Instantly share code, notes, and snippets.

View howardsilver-macdev's full-sized avatar

howardsilver-macdev howardsilver-macdev

View GitHub Profile
@howardsilver-macdev
howardsilver-macdev / ContentView.swift
Created August 1, 2024 07:29
Attempt at SwiftUI Sheets That Only Take Up Required Height of Enclosed View
import SwiftUI
struct ContentView: View {
@State private var isSheetPresented: Bool = false
@State private var sheetHeight: CGFloat = 0
var body: some View {
VStack {
Button("See sheet", action: {
isSheetPresented.toggle()