Skip to content

Instantly share code, notes, and snippets.

View nathantannar4's full-sized avatar

Nathan Tannar nathantannar4

View GitHub Profile
@nathantannar4
nathantannar4 / Run an animation when a value changes
Created August 25, 2023 06:51
SwiftUI ChangeEffect ViewModifier
import SwiftUI
struct ContentView: View {
@State var counter: Int = 0
var body: some View {
VStack(spacing: 24) {
Image(systemName: "exclamationmark.triangle.fill")
.font(Font.system(size: 50))
@nathantannar4
nathantannar4 / Switch.swift
Created December 20, 2018 23:57
Re-Engineering UISwitch
//
// Switch.swift
// Re-Engineering UISwitch
//
// Created by Nathan Tannar on 15/12/18.
// Copyright © 2018 Nathan Tannar. All rights reserved.
//
import UIKit
//
// Copyright (c) Nathan Tannar
//
import SwiftUI
import Engine // https://github.com/nathantannar4/Engine
import Turbocharger // https://github.com/nathantannar4/Turbocharger
import Transmission // https://github.com/nathantannar4/Transmission
#if os(iOS)