Table of Content
The way to change the cursor when it's over an NSButton
:
- First, you should subclass
NSButton
first, then add the code below:
@property (strong) NSCursor *cursor;
- (void)resetCursorRects {
if (self.cursor) {
[self addCursorRect:[self bounds] cursor: self.cursor];
} else {
[super resetCursorRects];
}
}
- Now, set cursor as you like:
[self.button setCursor:[NSCursor pointingHandCursor]];