Skip to content

Instantly share code, notes, and snippets.

View ricobeck's full-sized avatar
🏢
Working from office like an animal

Rico Becker ricobeck

🏢
Working from office like an animal
View GitHub Profile
@ricobeck
ricobeck / App.swift
Created October 1, 2024 09:39
Runtime change of app's tint color
struct HammerHeart: SwiftUI.App {
@UIApplicationDelegateAdaptor private var delegate: AppDelegate
@Shared(.appTintColor) var appTintColor: Color
var body: some Scene {
WindowGroup {
AppView(store: AppDelegate.store)
.accentColor(appTintColor)
.tint(appTintColor)
.onChange(of: appTintColor) {