๐จ I have an #AppKit pro tip for yโall that I just learned!!! ๐จ
If you have an `NSView` above an `NSTextView` and you want to change `NSCursor` when hovering the `NSView` to something like `NSCursor.pointingHand`, you need to make sure you don't call `super.mouseMoved(with: event)`.
If you call `super` on your `mouseMoved` event, it will override the `NSCursor` to the default. The default `NSCursor` for `NSTextView` is the `NSCursor.iBeam`, so you will experience the pointingHand to show very briefly, but then immediately be changed to the iBeam when you hover over the `NSView`.
I have spent the past three hours trying to figure out a solution to the cursor flickering and I literally just fixed it. #dev #Swift #AppKit
Login to reply
Replies (1)
๐คLets talk now! Via simpleX Chat- https://simplex.chat/contact#/?v=2-7&smp=smp%3A%2F%2FPtsqghzQKU83kYTlQ1VKg996dW4Cw4x_bvpKmiv8uns%3D%40smp18.simplex.im%2FWVZDOLVbGF1sbHAItrr7QdJ5ErK5aT7-%23%2F%3Fv%3D1-4%26dh%3DMCowBQYDK2VuAyEAz6NOW2Jb5eLP861jY9yBSvAALHryvggwT4LOJ026k2Q%253D%26q%3Dc%26srv%3Dlyqpnwbs2zqfr45jqkncwpywpbtq7jrhxnib5qddtr6npjyezuwd3nqd.onion