Can’t use scrollview,
Opened this issue · 1 comments
wisepmlin commented
The scrollview cannot be used in the view, and the offset will be set after use
shanezzar commented
The scrollview cannot be used in the view, and the offset will be set after use
I was able to implement a solution,
https://gist.github.com/jfuellert/67e91df63394d7c9b713419ed8e2beb7
Use this as scroll view instead of the native one.
@State private var contentOffset: CGPoint = .zero
ScrollableView(self.$contentOffset, animationDuration: 0.5) {
Group {
// your stuff
}
}
.frame(height: 300)