Hi,
I have obtained the crosshair cursor from NSCursor crosshairCursor. Then, how can i change
to it. I don't want to call enclosingScrollView to setDocumentCursor as
[[view enclosingScrollView] setDocumentCursor:crosshaircursor ];
Hi,
I have obtained the crosshair cursor from NSCursor crosshairCursor. Then, how can i change
to it. I don't want to call enclosingScrollView to setDocumentCursor as
[[view enclosingScrollView] setDocumentCursor:crosshaircursor ];
You just use the -set
method of NSCursor
to set the current cursor:
[[NSCursor crosshairCursor] set];
You can implement a resetCursorRects
method to send yourself addCursorRect:cursor:
mesasges. This way, the cursor will automatically change to the crosshair whenever it enters the appointed section of your view.