Skip to content

Instantly share code, notes, and snippets.

View flexaargo's full-sized avatar

Alex Fargo flexaargo

View GitHub Profile
@flexaargo
flexaargo / ContentView.swift
Created July 16, 2025 23:07
Presenting a Modal along with Keyboard in SwiftUI
import SwiftUI
struct ContentView: View {
@State private var presentModal = false
var body: some View {
Button {
presentModal.toggle()
} label: {
Text("Present Modal")
@flexaargo
flexaargo / gist:360fe18c5d3acf42062d34efe8258fe7
Created April 22, 2025 02:28
SwiftUI Text fontWeight Animation Bug
import SwiftUI
struct ContentView: View {
@State private var leftIsBold = false
var body: some View {
HStack {
Text("Hello")
.fontWeight(leftIsBold ? .bold : .regular)