For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| final class AppleViewModel: ObservableObject { | |
| var signInWithApple = SignInWithAppleCoordinator() | |
| @Published var user: User? | |
| func getRequest() { | |
| signInWithApple.getApppleRequest() | |
| } | |
| func getUserInfo() { |
| // | |
| // SnapCarousel.swift | |
| // prototype5 | |
| // | |
| // Created by xtabbas on 5/7/20. | |
| // Copyright © 2020 xtadevs. All rights reserved. | |
| // | |
| import SwiftUI |
| // Authoer: The SwiftUI Lab | |
| // Full article: https://swiftui-lab.com/scrollview-pull-to-refresh/ | |
| import SwiftUI | |
| struct RefreshableScrollView<Content: View>: View { | |
| @State private var previousScrollOffset: CGFloat = 0 | |
| @State private var scrollOffset: CGFloat = 0 | |
| @State private var frozen: Bool = false | |
| @State private var rotation: Angle = .degrees(0) |