Skip to content

Instantly share code, notes, and snippets.

View azamsharp's full-sized avatar

Mohammad Azam azamsharp

View GitHub Profile
struct CreditCard<Content>: View where Content: View {
var content: () -> Content
var body: some View {
content()
}
}
Prototypes in SwiftUI
https://youtu.be/1BHHybRnHFE
Animations SwiftUI
https://youtu.be/A4Byyls7zww
Clean code
https://youtu.be/7EmboKQH8lM
//
// AZAlert.swift
// HelloAlertSwiftUI
//
// Created by Mohammad Azam on 7/29/20.
// Copyright © 2020 Mohammad Azam. All rights reserved.
//
import SwiftUI
//
// ContentView.swift
// Shared
//
// Created by Mohammad Azam on 7/29/20.
//
import SwiftUI
import SwiftUI
struct FooView: View {
@State private var isSwitched: Bool = false
@Namespace private var ns
var body: some View {
HStack {
struct ContentView: View {
@Namespace var musicPlayerNS
@State private var showMusicPlayer: Bool = false
var frame: CGFloat {
showMusicPlayer ? 400 : 44
}
//
// ContentView.swift
// Shared
//
// Created by Mohammad Azam on 7/21/20.
//
import SwiftUI
struct ContentView: View {
@State private var couponId: Int = 0
var body: some View {
ScrollView {
VStack(spacing: -50) {
ForEach(1...20, id: \.self) { index in
CouponCell()
//
// CreditCard.swift
// CreditCardSwiftUI
//
// Created by Mohammad Azam on 7/21/20.
//
import SwiftUI
struct CreditCard<Content>: View where Content: View {
//
// ContentView.swift
// Shared
//
// Created by Mohammad Azam on 7/21/20.
//
import SwiftUI
struct ContentView: View {