Skip to content

Instantly share code, notes, and snippets.

//
// VolumeSlider.swift
// TristateToggleProject
//
// Created by Matthew Young on 12/3/19.
// Copyright © 2019 Matthew Young. All rights reserved.
//
// https://stackoverflow.com/questions/58286350/how-to-create-custom-slider-by-using-swiftui
// https://forums.swift.org/t/how-to-use-swiftui-anygesture-why-is-it-not-like-anyview/31624
extension Color {
// Rainbow colors
static let rainbowBlue = Color(red: 30 / 255, green: 158 / 255, blue: 221 / 255)
static let rainbowGraphite = Color(red: 92 / 255, green: 92 / 255, blue: 92 / 255)
static let rainbowOrange = Color(red: 240 / 255, green: 132 / 255, blue: 4 / 255)
static let rainbowPacificBlue = Color(red: 54 / 255, green: 82 / 255, blue: 97 / 255)
static let rainbowPurple = Color(red: 146 / 255, green: 61 / 255, blue: 158 / 255)
//
static let rainbowRed = Color(red: 216 / 255, green: 61 / 255, blue: 56 / 255)
static let rainbowSilver = Color(red: 204 / 255, green: 204 / 255, blue: 204 / 255)
//
// GradientBorderButtonStyle.swift
// LearningTrail-11112022
//
// Created by Matthew Young on 1/2/23.
//
import SwiftUI
import Shimmer // https://github.com/markiv/SwiftUI-Shimmer
//
// LikeView.swift
// lottie-first
//
// Created by Matthew Young on 12/31/22.
//
import SwiftUI
import Lottie
//
// SFSymbolDelayStart.swift
// VariableSFSymbolAnimation
//
// Created by Matthew Young on 12/27/22.
//
import SwiftUI
//
// DelayAppearance.swift
// VariableSFSymbolAnimation
//
// Created by Matthew Young on 12/29/22.
//
// About animation transaction:
// https://swiftwithmajid.com/2020/10/07/transactions-in-swiftui/
//
// EllipticalOrbitView.swift
// ChristmasTreeConclusion
//
// Created by Matthew Young on 12/27/22.
//
import SwiftUI
//
// ContentView.swift
// CoordinateShapeVsViewFrameOffset
//
// Created by Matthew Young on 12/26/22.
//
import SwiftUI
// VVVVVv
import SwiftUI
// VVVVVv
// the same math is used everywhere
enum Elliptical {
/// Calculate the cartitian coordinate (x, y)
/// - Parameters:
/// - angle: at this angle
import SwiftUI
//import Combine
struct NumbersOnlyViewModifier: ViewModifier {
@Binding var text: String
var includeDecimal: Bool
func body(content: Content) -> some View {
content