Skip to content

Instantly share code, notes, and snippets.

@gorenje
Created March 23, 2011 20:59
tooltips for toolbaritems
@implementation _CPToolbarItemView (MouseEntered)
- (void)mouseEntered:(CPEvent)anEvent
{
// TODO add code to check whether super responses to this method.
if ( [_toolbarItem toolTip] ) {
[TNToolTip toolTipWithString:[_toolbarItem toolTip]
forView:([_labelField stringValue] === @"" ? _imageView :
_labelField)
closeAfter:2.5];
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment