This file contains 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
// | |
// SignatureAnimation.swift | |
// OpenSwiftUIAnimations | |
// | |
// Created by Amos Gyamfi on 11.5.2024. | |
// | |
import SwiftUI | |
struct SignatureAnimation: View { |
This file contains 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 [Color] { | |
static func rainbow(hue: Double = 0, count: Int) -> Self { | |
(0..<count).map { i in | |
var value = hue + Double(i) / Double(count) | |
value -= floor(value) | |
return Color(hue: value, saturation: 1/4, brightness: 1) | |
} | |
} |
This file contains 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 SqureFlowView: View { | |
@StateObject private var holder = SquresHolder() | |
var body: some View { | |
TimelineView(.animation) { timeline in | |
Canvas { context, size in | |
holder.update(at: timeline.date, in: size) | |
for item in holder.squre { |
This file contains 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
// | |
// ViewController.swift | |
// Journal-Calendar-Demo | |
// | |
// Created by Seb Vidal on 30/04/2024. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
This file contains 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 LoadingView: View { | |
@State var theta: Double = 0 | |
let radius: Double = 60 | |
var body: some View { | |
ZStack { | |
ForEach(0..<8) { index in | |
let offset = ((2 * .pi) * Double(index)) / 8 |
This file contains 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
set -Ceu | |
PACKAGE_DIR=$( | |
cd "$(dirname "$0")/.." || exit 1 | |
pwd | |
) | |
cd "${PACKAGE_DIR}" || exit 1 | |
DERIVED_DATA_PATH=".build" | |
OUTPUT="XCFrameworks" |
This file contains 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 ContentView: View { | |
@State var theta: Double = 0 | |
let radius: Double = 60 | |
let colors: [Color] = [.purple, .red, .yellow, .blue, .green] | |
var body: some View { | |
ZStack { | |
ForEach(Array(colors.enumerated()), id: \.offset) { offset, style in |
This file contains 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
#!/bin/zsh | |
# Test if the Swift compiler knows about a particular language feature. | |
# | |
# Usage: | |
# | |
# swift-has-feature [--swift SWIFT_PATH] [--language-version LANGUAGE_VERSION] FEATURE | |
# | |
# The feature should be an upcoming or experimental language feature, | |
# such as `"StrictConcurrency"` or `"ExistentialAny"`. |
NewerOlder