Skip to content

Instantly share code, notes, and snippets.

@ncooke3
Created July 29, 2020 18:25
Show Gist options
  • Save ncooke3/26e13e49481c7da731168a18a61a5133 to your computer and use it in GitHub Desktop.
Save ncooke3/26e13e49481c7da731168a18a61a5133 to your computer and use it in GitHub Desktop.
Success View
// ContentView.swift
/// Displayed when a user successfuly logs in.
struct SuccessView: View {
let email: String
var body: some View {
/// The first view in this `ZStack` is a `Color` view that expands
/// to set the background color of the `SucessView`.
ZStack {
Color.orange
.edgesIgnoringSafeArea(.all)
VStack(alignment: .leading) {
Group {
Text("Welcome")
.font(.largeTitle)
.fontWeight(.semibold)
Text(email.lowercased())
.font(.title3)
.fontWeight(.bold)
.multilineTextAlignment(.leading)
}
.padding(.leading)
Image(systemName: "checkmark.circle")
.resizable()
.aspectRatio(contentMode: .fit)
.scaleEffect(0.5)
}
.foregroundColor(.white)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment