Skip to content

Commit eb432bc

Browse files
committed
round button add cursor
1 parent 0a51cfa commit eb432bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CubicBezier/Views/RoundButton.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ -(void)initUI{
2929
self.layer.masksToBounds = YES;
3030
self.layer.cornerRadius = RoundButtonDiameter / 2.0;
3131
self.backgroundColor = [NSColor whiteColor];
32+
33+
[self.window invalidateCursorRectsForView:self];
3234
}
3335

3436
-(void)drawRect:(NSRect)dirtyRect{
@@ -46,4 +48,9 @@ -(void)setShowBorder:(BOOL)showBorder{
4648
}
4749
}
4850

51+
-(void)resetCursorRects {
52+
[super resetCursorRects];
53+
[self addCursorRect:self.bounds cursor:[NSCursor pointingHandCursor]];
54+
}
55+
4956
@end

0 commit comments

Comments
 (0)