Skip to content

Instantly share code, notes, and snippets.

View navsing's full-sized avatar
🏠
Working from home

Navdeep Singh navsing

🏠
Working from home
View GitHub Profile
@navsing
navsing / MessagesPart-III.swift
Last active March 6, 2025 14:32
Recreating the Messages App Part III (Chat Bubble Shape) using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
VStack {
HStack {
Spacer()
Text("Here’s to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes… the ones who see things differently — they’re not fond of rules…").padding().background(Color(UIColor.systemBlue)).clipShape(BubbleShape(myMessage: true)).foregroundColor(.white)
@navsing
navsing / iPhone12ProWebsite.swift
Created July 15, 2020 19:05
iPhone 12 Pro Buying Experience
//
// Apple.swift
// Playground
//
// Created by Navdeep Singh on 7/14/20.
//
import SwiftUI
struct Apple: View {
@navsing
navsing / threads.swift
Created August 11, 2020 23:15
Recreating the Threads app by Instagram using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
VStack (spacing: 24) {
HStack {
Image(systemName: "line.horizontal.3").padding().background(Color.secondary.opacity(0.2)).clipShape(Circle())
Spacer()
@navsing
navsing / iosSplash.swift
Created August 20, 2020 23:30
Recreate iOS style Welcome Screen to any app in 3 minutes
//
// Welcome.swift
// Playground
//
// Created by Nav Singh on 8/20/20.
//
import SwiftUI
struct Welcome: View {
@navsing
navsing / sharesheet.swift
Created August 27, 2020 21:57
Recreate iOS share sheet to any app in a minute
import SwiftUI
struct ShareSheet: View {
@State var show = false
@State var items: [Any] = []
var body: some View {
VStack {
Button(action: {
//Add Logic to add items here
self.show.toggle()
@navsing
navsing / applemusicanimate.swift
Last active November 17, 2024 05:05
Recreating Apple Music Animation Using SwiftUI and Xcode
import SwiftUI
struct AppleMusicAnimation: View {
@State var show = false
@Namespace var namespace
var body: some View {
VStack {
Spacer()
VStack (spacing: 15) {
import SwiftUI
import PlaygroundSupport
struct Screen: View {
@State var show = false
@State var items: [Any] = []
var body: some View {
VStack {
Button(action: {
self.items.removeAll()
import SwiftUI
struct PaymentRing: View {
@State var frameSize = UIScreen.main.bounds.width - 120
@State var current: CGFloat = 0
@State var value: Double = 0
var body: some View {
VStack {
ZStack {
Circle().stroke(Color.secondary, style: StrokeStyle(lineWidth: 40, lineCap: .butt, lineJoin: .round)).frame(width: frameSize, height: frameSize)
@navsing
navsing / clubhouse.swift
Created February 11, 2021 21:22
Recreating ClubHouse in SwiftUI with Dark Mode
//
// Clubhouse.swift
// Playground
//
// Created by Nav Singh on 2/11/21.
//
import SwiftUI
struct Clubhouse: View {
@navsing
navsing / ShimmerSampleView.swift
Created January 5, 2023 23:45
Shimmer Sample View
ScrollView(.vertical, showsIndicators: false) {
VStack {
HStack {
VStack (alignment: .leading) {
Text("Shimmer").fontWeight(.heavy).font(.largeTitle).foregroundColor(Color(UIColor.systemOrange))
}
Spacer()
}
ForEach(0..<4){_ in
ZStack {