As of OS X 10.10 most of NSStatusItem has been deprecated in favour of the button property, which consists of an NSStatusBarButton. It should work like a norma
Luke’s answer is great. I’m just sharing my implementation based on that.
NSButton *button = [[NSButton alloc] initWithFrame:self.statusItem.button.frame];
button.alphaValue = 0;
NSArray *array = @[self.statusItem.button, button];
self.statusItem.button.superview.subviews = array;
[button sendActionOn:(NSLeftMouseDownMask | NSRightMouseDownMask)];
button.target = self;
button.action = @selector(statusItemClicked);