Created
May 14, 2020 22:05
-
-
Save navsing/eb02b7f2bf8bbff1441758ccbd3e4eca to your computer and use it in GitHub Desktop.
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 Login: View { | |
| @ObservedObject var appleView = AppleViewModel() | |
| var body: some View { | |
| VStack { | |
| if appleView.user != nil { | |
| //User Logged In | |
| } else { | |
| Button(action: { | |
| self.appleView.getRequest() | |
| }){ | |
| AppleIdButton() | |
| .background(Color.primary).clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous)).padding(7) | |
| .frame(width: UIScreen.main.bounds.width - 100, height: 65) | |
| } | |
| }.onAppear( perform: { | |
| self.appleView.getUserInfo() | |
| }) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment