Skip to content

Instantly share code, notes, and snippets.

View JamesSedlacek's full-sized avatar
💻
Building

James Sedlacek JamesSedlacek

💻
Building
View GitHub Profile
//
// EnvironmentBindable.swift
//
// Created by James Sedlacek on 3/6/24.
//
import SwiftUI
/// A property wrapper that provides a convenient way to bind observable objects from the environment
/// to a SwiftUI view. This wrapper simplifies the process of accessing and binding environment objects
//
// Persisting.swift
//
// Created by James Sedlacek on 1/30/25.
//
import SwiftUI
/// A property wrapper that manages the persistence of Codable types using UserDefaults.
///
@JamesSedlacek
JamesSedlacek / View+OpenUrl.swift
Last active February 14, 2025 11:13
This file provides a safe way to open URLs in SwiftUI applications.
//
// View+OpenUrl.swift
//
// Created by James Sedlacek on 11/26/24.
//
/// This file provides a safe way to open URLs in SwiftUI applications.
/// It adds a view modifier that handles URL opening with user confirmation
/// and multiple opening options (browser, in-app, or copy to clipboard).
///
@JamesSedlacek
JamesSedlacek / KeyboardToolbar.swift
Last active April 1, 2025 16:41
SwiftUI Keyboard Toolbar Workaround
//
// KeyboardToolbar.swift
//
// Created by James Sedlacek on 9/20/23.
//
import SwiftUI
import Combine
@Observable