I want to get the NSCursor for the move cursor (Figure 1).
I was looking for cursors that weren't publicly exposed in NSCursor and came across this question. Especially pertinent is the last answer, which contains the selector _moveCursor. However when the cursor returned by the selector is set, I get the following result:
and the code responsible for selecting the cursor:
NSCursor *test;
SEL selector = @selector(_moveCursor);
if ([NSCursor respondsToSelector:selector])
{
test = [NSCursor performSelector:selector];
} else {
test = [NSCursor closedHandCursor];
}
[test set];
The rest is in a stock cocoa application and the snippet is in mouseEntered.
I want to address the other answers in the above SO question, which involve loading the cursor from image file, that you can find these in other frameworks, like webkit.
My question boils down to: Is there another way to achieve this, for lack of a better term a 'proper' way to get this cursor, or should I just used the vector graphic I can find inside of the afore mentioned frameworks?
My problem with loading a file may restrict me if that framework is unavailable on older versions of macos, and holding the resource myself is not an ideal solution either.
Let me know if I missed something or if there's an alternative.
(Apologies for the screenshot quality, screen capture doesn't include the cursor)

