Post

Replies

Boosts

Views

Activity

SwiftUI - Horizontal Scroll not Working with NSTextView in NSViewRepresentable
Hello, I have an NSViewRepresentable displaying an NSTextView in SwiftUI. GeometryReader() { geometry in ScrollView([.vertical, .horizontal]) { Representable() // -18 for vertical scroller .frame(minWidth: geometry.size.width - 18) } } When I use the vertical scrollbar the mouse click is passed to the Representable and is not registered by the Scroll bar. In the image you can see I tried to use the scroll bar and it highlighted some text instead. There is a suggestion on stackoverflow to use an overlay. This fixes the scrolling issue, but will then make the Representable uninteractable. How can I use the horizontal scroll bar here as expected?
1
0
187
3w