Skip to content

Instantly share code, notes, and snippets.

View cyrilzakka's full-sized avatar
💭
coding...

Cyril Zakka, MD cyrilzakka

💭
coding...
View GitHub Profile
@dkun7944
dkun7944 / ContentView.swift
Created July 31, 2023 03:36
AirDrop iOS 17 Swift.Shader Animation
//
// ContentView.swift
// Airdrop Demo
//
// Created by Daniel Kuntz on 7/30/23.
//
import SwiftUI
struct ContentView: View {
@alexwidua
alexwidua / ContentView.swift
Created July 4, 2023 17:07
SwiftUI Grid Animation
import SwiftUI
// 1. Use looped H/VStacks to create a grid
// 2. Conditionally increase spacing to grow/shrink the grid
// 3. Calculate the distance of each dot to the center and use the value to stagger the animation
//4. Add random delay on top of the staggered delay value
struct ContentView: View {
// const & state
@andreyryabtsev
andreyryabtsev / backmatting.ipynb
Last active January 16, 2024 11:59
BackMatting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
struct RootView: View {
@State private var isHomeShown = true
@State private var selectedContent = "content1"
var body: some View {
ZStack {
ContentView(content: $selectedContent,
isHomeShown: $isHomeShown)
.blur(radius: isHomeShown ? 10 : 0)
.scaleEffect(isHomeShown ? 0.8 : 1)
import SwiftUI
class MyModel: ObservableObject {
@Published var attempted: Bool = false
@Published var firstname: String = "" {
didSet { updateDismissability() }
}
@Published var lastname: String = "" {
//
// ContentView.swift
// BreatheUI WatchKit Extension
//
// Created by Joel Bernstein on 6/24/19.
// Copyright © 2019 Joel Bernstein. All rights reserved.
//
import SwiftUI