bottom-sheet icon indicating copy to clipboard operation
bottom-sheet copied to clipboard

Can’t use scrollview,

Open wisepmlin opened this issue 3 years ago • 1 comments

The scrollview cannot be used in the view, and the offset will be set after use

wisepmlin avatar Jun 21 '21 09:06 wisepmlin

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)

shanezzar avatar Jul 12 '21 09:07 shanezzar