Skip to content

Instantly share code, notes, and snippets.

View 1998code's full-sized avatar
👨‍💻
Hello World!

MING 1998code

👨‍💻
Hello World!
View GitHub Profile
@1998code
1998code / ContentView.swift
Created March 14, 2025 16:04
TestFlight Topbar
//
// ContentView.swift
// TestFlight
//
// Created by Ming on 14/3/2025.
//
import SwiftUI
struct ContentView: View {
@1998code
1998code / ContentView.swift
Created February 28, 2025 14:08
Shimmer Effect 2025
// Copyright © 2025 MING
// MIT License
import SwiftUI
struct ContentView: View {
@State private var colorful: Bool = true
@State private var dragLocation: CGPoint = .zero
var body: some View {
@1998code
1998code / ContentView.swift
Created July 27, 2024 10:48
Olympic Games 2024
//
// ContentView.swift
// olympics
//
// Created by Ming on 27/7/2024.
//
import SwiftUI
struct ContentView: View {
@1998code
1998code / ContentView.swift
Created July 5, 2024 12:16
Email Block List (SwiftUI)
//
// ContentView.swift
// Email Block List
//
// Created by Ming on 5/7/2024.
//
import SwiftUI
struct ContentView: View {
@1998code
1998code / ContentView.swift
Created June 24, 2024 07:13
Picker Demo in .navigationLink Style
//
// ContentView.swift
// Picker Demo in .navigationLink Style
//
// Created by Ming on 24/6/2024.
//
import SwiftUI
struct ContentView: View {
@1998code
1998code / demo.swift
Created November 16, 2022 03:48
AppStorage + Sheet + Slider bugs on iOS16
//
// ContentView.swift
// Demo
//
// Created by Ming on 16/11/2022.
//
import SwiftUI
struct ContentView: View {
@1998code
1998code / DynamicIsland.swift
Last active September 17, 2022 10:44
Demo of Dynamic Island
//
// WidgetDemo.swift
// WidgetDemo
//
// Created by Ming on 28/7/2022.
//
import ActivityKit
import WidgetKit
import SwiftUI
@1998code
1998code / scenePhase.swift
Last active September 6, 2022 05:43
Demo of scenePhase (SwiftUI)
//
// ContentView.swift
// ScenePhase
//
// Created by Ming on 6/9/2022.
//
import SwiftUI
struct ContentView: View {
@1998code
1998code / torchFunc.swift
Last active December 14, 2022 01:47
Torch Light Function
import SwiftUI
import AVFoundation
func toggleTorch(on: Bool) {
guard let device = AVCaptureDevice.default(for: .video) else { return }
if device.hasTorch {
do {
try device.lockForConfiguration()
device.torchMode = on ? .on : .off