Skip to content

Instantly share code, notes, and snippets.

@vlondon
Created June 20, 2020 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlondon/9d27a68bf6d879f9dd4b03076371191d to your computer and use it in GitHub Desktop.
Save vlondon/9d27a68bf6d879f9dd4b03076371191d to your computer and use it in GitHub Desktop.
struct ContentView: View {
@State private var isSubtitleVisible: Bool = false
var body: some View {
VStack {
Text("Title")
if isSubtitleVisible {
Text("Subtitle")
} else {
EmptyView()
}
Text("Body")
Spacer()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment