scrollview swift
//We can use the ScrollView struct in SwiftUI which allows us to scroll down
//Declaration:
struct ScrollView<Content> where Content : View
//Example of ScrollView
ScrollView {
VStack {
ForEach(0..<100) {
Text("Row ($0)")
}
}
}
}
//Let's say here, we have 100 text views. Without the scroll view, we would not be able to see all 100 text views.
//However, this is exactly what the scroll view enables us to do