On 15 Feb 2017, at 11:24, Colas B <colasj...@yahoo.fr> wrote: > thanks for your answer. > I want to do the former: when the user enables a mode in the application, the > cursor changes, exactly in the way you described (the shape changes). The > user should be able to use this custom cursor over a PDFView, a UIScrollView, > etc. However, I need the cursor only in one window. Later the user can leave > this mode and go back to the normal behaviour. > I'm looking for a solution that does not require subclassing all the views.
This is still very vague, so I don't think I have enough information to help you. The problem might be that you have overlapping tracking regions, where one is fully contained inside the other. I think NSTrackingArea doesn't like that (it's been a while, so I might be mis-remembering). I'm not sure if there's a way to remove or move the other tracking areas, but that seems like a skanky hack. You can't handle this in a generic way without risking unexpected behaviour from the views involved. That said, depending on what views you're dealing with, you might have luck with overriding its parent view's hitTest method. -- Uli PS - I'm a bit confused about your code, as it contains mentions of iPhone and you mention UIScrollView ... but iOS doesn't have a mouse ... ? Typos? _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com