Skip to content

Instantly share code, notes, and snippets.

View tunds's full-sized avatar

tundsdev tunds

View GitHub Profile
@tunds
tunds / AnimatingMeshView.swift
Created September 17, 2024 05:43 — forked from davidsteppenbeck/AnimatingMeshView.swift
Animating mesh gradient for iOS 18 using TimelineView
import SwiftUI
struct AnimatingMeshView: View {
let referenceDate: Date
var body: some View {
TimelineView(.animation) { context in
let t = context.date.timeIntervalSince(referenceDate)
MeshGradient(width: 5, height: 4, points: [