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
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
import SwiftUI | |
let symbols = [ | |
"pencil", | |
"trash", | |
"folder", | |
"camera", | |
"photo", | |
"clock", | |
"arrow.right.circle.fill", |
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 AnimationGridView: View { | |
@State | |
private var id: UUID = .init() | |
var body: some View { | |
ZStack { | |
Color(.systemBackground) | |
VStack { |
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
// 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) |
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 | |
import Combine | |
extension ParticlesView { | |
init(count: Int) { | |
self.init(scales: Array(repeating: false, count: count)) | |
} | |
} | |
struct ParticlesView: View { |
NewerOlder