This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CreditCard<Content>: View where Content: View { | |
var content: () -> Content | |
var body: some View { | |
content() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prototypes in SwiftUI | |
https://youtu.be/1BHHybRnHFE | |
Animations SwiftUI | |
https://youtu.be/A4Byyls7zww | |
Clean code | |
https://youtu.be/7EmboKQH8lM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AZAlert.swift | |
// HelloAlertSwiftUI | |
// | |
// Created by Mohammad Azam on 7/29/20. | |
// Copyright © 2020 Mohammad Azam. All rights reserved. | |
// | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Shared | |
// | |
// Created by Mohammad Azam on 7/29/20. | |
// | |
import SwiftUI | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct FooView: View { | |
@State private var isSwitched: Bool = false | |
@Namespace private var ns | |
var body: some View { | |
HStack { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
@Namespace var musicPlayerNS | |
@State private var showMusicPlayer: Bool = false | |
var frame: CGFloat { | |
showMusicPlayer ? 400 : 44 | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Shared | |
// | |
// Created by Mohammad Azam on 7/21/20. | |
// | |
import SwiftUI | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@State private var couponId: Int = 0 | |
var body: some View { | |
ScrollView { | |
VStack(spacing: -50) { | |
ForEach(1...20, id: \.self) { index in | |
CouponCell() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CreditCard.swift | |
// CreditCardSwiftUI | |
// | |
// Created by Mohammad Azam on 7/21/20. | |
// | |
import SwiftUI | |
struct CreditCard<Content>: View where Content: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Shared | |
// | |
// Created by Mohammad Azam on 7/21/20. | |
// | |
import SwiftUI | |
struct ContentView: View { |