Posts

Post not yet marked as solved
3 Replies
1.3k Views
ScrollView with clipShape or cornerRadius freezes app when offset applied to superview and it reaches safe area.struct ContentView: View { @State var offset: CGSize = .zero var body: some View { ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 17) { ForEach(0...10, id: \.self) { i in Color.black .frame(width: 60, height: 60) .clipShape(Circle()) } } } .clipShape(Capsule()) .offset(x: 0, y: offset.height) .edgesIgnoringSafeArea(.all) .gesture( DragGesture().onChanged { value in self.offset = value.translation }.onEnded { value in self.offset = .zero } ) } }To test that just try to move scrollview to top or bottom safe area. App gets freezed with no exception or error and never refresh.
Posted Last updated
.