This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CDView.swift | |
// CD | |
// | |
// Created by Daniel Kuntz on 7/3/23. | |
// | |
import SwiftUI | |
struct ShapeWithHole: Shape { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// GradientComponenet | |
// | |
// Created by David Smith on 2/21/23. | |
// Updaetd by Drew Fitzpatrick on 2/24/23. | |
// | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Blobs.swift | |
// SwiftUI Demos | |
// | |
// Created by Morten Just on 1/31/23. | |
// | |
import SwiftUI | |
struct Blobs: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import Combine | |
struct ContentView: View { | |
@State private var text = "A\nB\nC\nD\nE\nF\nG\nH" | |
@State private var image: Image? | |
private let snapshotRequester = PassthroughSubject<Void, Never>() | |
var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct NewStopView: View { | |
let stop: Model.Stop | |
var body: some View { | |
Text("New Layout").font(.title) | |
RouteLayout(spacing: 8) { | |
ForEach(stop.routes ?? []) { route in | |
RouteView(route: route) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
@propertyWrapper | |
class Tappable<T: UIView>: NSObject, UIGestureRecognizerDelegate { | |
// MARK: - Public Properties | |
public var wrappedValue: T? { | |
willSet { | |
removeGesture() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIView { | |
func add3DFloatingEffect(withDepth depth: Double = 1 / 12, duration: Double = 5) { | |
let depthAngle = depth * .pi | |
let rotationAnimationY = CABasicAnimation(keyPath: "transform.rotation.y") | |
rotationAnimationY.fromValue = NSNumber(floatLiteral: -1 * depthAngle) | |
rotationAnimationY.toValue = NSNumber(floatLiteral: depthAngle) | |
rotationAnimationY.duration = duration | |
rotationAnimationY.repeatCount = Float(Int.max) | |
rotationAnimationY.autoreverses = true | |
rotationAnimationY.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct CircleWave: Shape { | |
let N = 360 | |
let SPEED: Double = 1 / 1000.0 | |
let SHIFT: Double = 2 * Double.pi / 3 | |
let FREQUENCY: Double = 8 | |
var factor: Double | |
var colorIndex: Double | |
NewerOlder