scrollview swiftui
var body: some View { ScrollView { VStack(alignment: .leading) { ForEach(0..<100) { Text("Row \($0)") } } } }
Source: developer.apple.com
swift scrollview hide scrollbar
scrollView.showsHorizontalScrollIndicator = false scrollView.showsVerticalScrollIndicator = false
Source: stackoverflow.com
swift collectionview scrolltoitem
self.collectionView.scrollToItem(at:IndexPath(item: indexNumber, section: sectionNumber), at: .right, animated: false)
swiftui scrollview
ScrollView { VStack(alignment: .leading) { ForEach(0..<100) { Text("Row \($0)") } } }
Source: developer.apple.com