Skip to content

Instantly share code, notes, and snippets.

@chriseidhof
chriseidhof / sample.swift
Last active June 11, 2024 06:11
View Inspection
import SwiftUI
struct SizeKey: PreferenceKey {
static func reduce(value: inout CGSize?, nextValue: () -> CGSize?) {
value = value ?? nextValue()
}
}
struct ContentView: View {
@State var width: CGFloat? = nil
var body: some View {
@lattner
lattner / TaskConcurrencyManifesto.md
Last active June 19, 2024 13:41
Swift Concurrency Manifesto