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/bash | |
# https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api | |
searchTerms=( | |
# File timestamp APIs | |
"creationDate" | |
"modificationDate" | |
"fileModificationDate" | |
"contentModificationDateKey" | |
"creationDateKey" |
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 DemoView: View { | |
@State var effectValue: Double | |
let end = 2.75 | |
init() { | |
self._effectValue = State(initialValue: end) |
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 TaskTrigger<T: Equatable>: Equatable { | |
fileprivate enum TaskState<S: Equatable>: Equatable { | |
case inactive | |
case active(value: S, uniqueId: UUID? = nil) | |
} | |
fileprivate var state: TaskState<T> = .inactive |
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
// | |
// ContentView.swift | |
// Airdrop Demo | |
// | |
// Created by Daniel Kuntz on 7/30/23. | |
// | |
import SwiftUI | |
struct ContentView: 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 | |
// https://gist.github.com/Koshimizu-Takehito/93c5891e89d65eadf2164351ca1f2d76 | |
typealias ChartElement = (name: String, count: Int, color: Color) | |
struct AnimatedDonutChart: View { | |
@State private var progress: Double = 0 | |
let data: [ChartElement] |
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
// Thanks to @Ren_yello | |
// https://twitter.com/ren_yello/status/1681856952090112000?s=61&t=SNv1ZCU_S3Y8TobPv4MBww | |
import SwiftUI | |
struct PhisicsLoadingView: View { | |
@State private var color: CGColor = .black | |
@State private var angle1: CGFloat = .pi/2 | |
@State private var angle2: CGFloat = .pi/2 | |
@State private var angle3: CGFloat = .pi/2 |
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 ProgressRectangle: View { | |
@State private var index = [0, 1, 2, 3] | |
@State private var scale: [CGFloat] = [1.0, 0.4, 1.0, 0.4] // Scale for each circle | |
let colors = [Color("Red"), Color("Green"), Color("Blue"), Color("Yellow")] // Colors for each circle | |
let minScale: CGFloat = 1.0 // Minimum scale value | |
let maxScale: CGFloat = 2.0 // Maximum scale value | |
@State private var opacity = 1.0 |
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
// Thanks to @Ren_yello | |
// https://twitter.com/ren_yello/status/1681556136682741762?s=61&t=SNv1ZCU_S3Y8TobPv4MBww | |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
LoadingSquares() | |
} | |
} |
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 | |
// Thanks to @Ren_yello | |
// https://twitter.com/ren_yello/status/1681135824145113089?s=61&t=Z69bUaia8ogjDHp-N7Xvvg | |
struct ContentView: View { | |
@State var ratio: Double = 0 | |
@State var angle: CGFloat = 0 | |
@State var delta: CGFloat = 0 | |
var body: some 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 | |
struct ContentView: View { | |
@State var selectedIndex = 0 | |
let options = ["Apple", "Orange", "Muscat"] | |
let colors: [Color] = [.red, .orange, .green] | |
var body: some View { | |
VStack { | |
SegmentedControl(selectedIndex: $selectedIndex, options: options, colors: colors) |