I am creating a custom NSButtonCell
for a custom rendering.
Now, I want to have different aspect depending if the mouse is over the button or not. How can
You need to Subclass the NSButton class (or even better the NSButtonCell class). As Justin said if you put the two method
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
They should get called when the mouse enter and exit the area. You may also need to re create the tracking area, look here:
- (void)updateTrackingAreas
For fade in and fade out effect I played with animator and alpha value for example:
[self animator]setAlphaValue:0.5];