Skip to content

Instantly share code, notes, and snippets.

@betty-godier
Created September 13, 2022 10:52
Show Gist options
  • Save betty-godier/db2c01b6ce8b9047ef742599f1f57782 to your computer and use it in GitHub Desktop.
Save betty-godier/db2c01b6ce8b9047ef742599f1f57782 to your computer and use it in GitHub Desktop.
Creation of the construction of the view , ScrollView, VStack
import SwiftUI
struct ContentView: View {
private var currentSymbol: String?
private var conditions: String?
var body: some View {
ScrollView {
VStack {
if let currentSymbol {
Image(systemName: currentSymbol)
.font(.system(size: 200, weight: .light))
}
if let conditions {
Text(conditions)
.font(.title)
}
}
.frame(maxWidth: .infinity)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment