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
// | |
// ColorProvider.swift | |
// VariableSFSymbolAnimation | |
// | |
// Created by Matthew Young on 12/24/22. | |
// | |
import SwiftUI | |
extension BinaryInteger { |
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 Algorithms | |
enum VariableSFSymbol { | |
static func columnsOfSymbols(columnCount: Int) -> [[String]] { | |
Self.allVariableSFSymbolNames.chunks(ofCount: columnCount).map({ Array($0) }) | |
} | |
static let allVariableSFSymbolNames = [ | |
"rectangle.and.pencil.and.ellipsis", |
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
// | |
// SFSymbolImage.swift | |
// SFSymbolVariableValueAnimationWrong | |
// | |
// Created by Matthew Young on 12/22/22. | |
// | |
import SwiftUI | |
struct AnimatableVariableValueModifier: Animatable, ViewModifier { |
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 | |
extension Double { | |
var zeroToOneCycle: Self { | |
self >= 0.9 ? 0 : self + 0.1 | |
} | |
} | |
struct ProgressSymbol: View{ | |
let date: Date |
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
// | |
// AppIconMakerDemo.swift | |
// SwiftUI40 | |
// | |
// Created by Mateo on 6/13/22. | |
// | |
// base from this: | |
// https://www.youtube.com/watch?v=iNCXmq99mjw |
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 MovieCreditRoll: View { | |
let data = [ | |
["Director", "Joseph Kosinski"], | |
["Writers", "Jim Cash\nJack Epps Jr.\nPeter Craig\nJustin Marks\nEhren Kruger\nEric Warren Singer\nChristopher\nMcQuarrie"], | |
["Tom Cruise", "Capt. Pete 'Maverick' Mitchell"], | |
["Val Kilmer", "Adm. Tom 'Iceman' Kazansky"], | |
["Miles Teller", "Lt. Bradley 'Rooster' Bradshaw"], | |
["Jennifer Connelly", "Penny Benjamin"], |
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 | |
extension BinaryInteger { | |
var evenOddDirection: Double { | |
self.isMultiple(of: 2) ? 1 : -1 | |
} | |
} | |
struct ScrollingEmojiView: View { | |
@State private var direction = 1.0 |
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 | |
// ColorCodable | |
// | |
// Created by Mateo on 5/26/22. | |
// | |
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
import SwiftUI | |
extension UnitPoint { | |
/// Compute the unit circle coordinates rotating at the center of UnitPoint fitted inside the bounding box | |
/// - Parameters: | |
/// - angle: angle of rotation vector of the coordinate | |
/// - factor: scaling factor of the unit circle | |
init(angle: Angle, scaling factor: Double = 1) { | |
self.init(x: (1 + factor * sin(angle.radians)) / 2, y: (1 + factor * cos(angle.radians)) / 2) |