Post

Replies

Boosts

Views

Activity

Reply to NSHostingView Not Working With Swift 6.0
macOS 15.1. In an example app I wrap a SwiftUI Button and an NSButton in a NSView container. When showing the container from a simple NSViewRepresentable, both work. But when I show the container in an overlay of a PDFView using PDFPageOverlayViewProvider, just the SwiftUI button does not work. I set no offsets. Both Buttons work on iOS (using UI... variants). A possible cause might be that is that text selection mode is active on Mac by default. But why would this just stop the SwiftUI button and not the NSButton from working?
10h