Last active
September 4, 2020 10:47
-
-
Save aataraxiaa/2ae91c5a75a5c18fcaffdd80a4e6dbd1 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 OnboardingButton: View { | |
| // #1 | |
| @AppStorage("needsAppOnboarding") var needsAppOnboarding: Bool = true | |
| var body: some View { | |
| GeometryReader { proxy in | |
| LazyHStack { | |
| Button(action: { | |
| // #2 | |
| needsAppOnboarding = false | |
| }) { | |
| Text("Finish Setup") | |
| .padding(.horizontal, 40) | |
| .padding(.vertical, 15) | |
| .font(Font.title2.bold().lowercaseSmallCaps()) | |
| } | |
| .background(Color.white) | |
| .foregroundColor(.black) | |
| .cornerRadius(40) | |
| .frame(minWidth: 0, maxWidth: proxy.size.width-40) | |
| } | |
| .frame(width: proxy.size.width, height: proxy.size.height/1.5) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment