Created
June 20, 2020 08:30
-
-
Save vlondon/9d27a68bf6d879f9dd4b03076371191d 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 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