Skip to content

Instantly share code, notes, and snippets.

View PetreVane's full-sized avatar
🍃

Petre Vane PetreVane

🍃
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@IanKeen
IanKeen / Example_Complex.swift
Last active June 26, 2024 05:39
PropertyWrapper: @transaction binding for SwiftUI to make changes to data supporting commit/rollback
struct User: Equatable {
var firstName: String
var lastName: String
}
@main
struct MyApp: App {
@State var value = User(firstName: "", lastName: "")
@State var showEdit = false
let sameUrl = URL(string: "https://i.redd.it/dj4bz294zqhz.png")!
TaskManager.shared.dataTask(with: sameUrl) { (data, response, error) in
// ...
}
TaskManager.shared.dataTask(with: sameUrl) { (data, response, error) in
// ...
}