Thread

Having some trouble with changing the `NSCursor` on hover. I have an `NSButton` layered on top of an `NSTextView`, and I want the button to use the `.pointingHand` cursor type when hovering it. But the text view will constantly override the `.pointingHand` back to the default for text views, which is the `.iBeam`. It’s not the first time I’ve been fighting this behavior. I’ve been trying to find a workaround before, but never spent much time on it, as I considered it a low-priority bug fix. But today I finally had the time to figure out a way to fix it. #AppKit #macOS

Replies (1)

Tomorrow I need to get the solution implemented in my notes app. I currently have an ellipsis button layered on top of a text view used for headings. The button will show whenever a heading is in its collapsed state. Hovering over the button should show the `.pointingHand`, and clicking it should expand the heading. I do have the button implemented in SwiftUI, but am experiencing the `NSCursor` problem, so will need to use the AppKit solution I came up with.