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 private var start = Date.now | |
var body: some View { | |
VStack { | |
TimelineView(.animation) { timeline in | |
let time = start.distance(to: timeline.date) | |
Rectangle() |
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 View where Self: Shape { | |
func glow( | |
fill: some ShapeStyle, | |
lineWidth: Double, | |
blurRadius: Double = 8.0, | |
lineCap: CGLineCap = .round | |
) -> some View { | |
self |
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 | |
// olympics | |
// | |
// Created by Ming on 27/7/2024. | |
// | |
import SwiftUI | |
struct ContentView: View { |