Skip to content

Instantly share code, notes, and snippets.

@WinterArch
WinterArch / ContentView.swift
Last active November 20, 2023 06:04
Model-View Design Patterns Plus
import SwiftUI
/// ContentView: Model
struct ContentView {
/// viewmodel first, one View one View Model, intuitively. if need.
@StateObject private var viewmodel = ViewModel()
/// properties here
let recordTime: Date
@WinterArch
WinterArch / FullScreenPop.swift
Last active November 14, 2023 08:05
FullScreenPop_SwiftUI
import SwiftUI
// Source from Kavsoft-youtube
// https://www.youtube.com/watch?v=4ceKPSTlL4I
struct FullSwipeNavigationStack<Content: View>: View {
@ViewBuilder var content: Content
/// Full Swipe Custom Gesture
@State private var customGesture: UIPanGestureRecognizer = {
let gesture = UIPanGestureRecognizer()
gesture.name = UUID().uuidString
@WinterArch
WinterArch / Flappy Bird
Last active October 8, 2023 08:35
Flappy_Bird_SwiftUI+SpriteKit
//
// ContentView.swift
// Flappy Bird
// Code and Assets From [github.com/sideslash/FlappyBird]
// Created by tomlbro on 2023/9/30.
//
import SwiftUI
import SpriteKit