Latest 1.0.2
Homepage https://github.com/questbeat/QBStatusItemView
License MIT
Platforms osx 10.6, requires ARC
Authors

Custom status item view that can be highlighted programmatically.

What’s this?

NSStatusItem can be highlighted only if it is clicked.
It’s a problem if you want to show your original popup programmatically.

QBStatusItemView can be set to the view property of NSStatusItem and can be highlighted programmatically.
So it is useful for apps that uses original popup instead of NSMenu.

Installation

#import "QBStatusItemView.h" in your project.

Example

NSStatusItem *statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
statusItem.image = [NSImage imageNamed:@"status_icon"];
statusItem.alternateImage = [NSImage imageNamed:@"status_icon_highlighted"];

QBStatusItemView *statusItemView = [[QBStatusItemView alloc] init];
statusItemView.delegate = self;

statusItem.view = statusItemView;

And delegate will be notified when the view is activated and deactivated.

#pragma mark - QBStatusItemViewDelegate

- (void)statusItemViewDidActivate:(QBStatusItemView *)statusItemView
{
    NSLog(@"*** statusItemViewDidActivate:");
}

- (void)statusItemViewDidDeactivate:(QBStatusItemView *)statusItemView
{
    NSLog(@"*** statusItemViewDidDeactivate:");
}

Author

Katsuma Tanaka, [email protected]

License

QBStatusItemView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "QBStatusItemView",
    "version": "1.0.2",
    "summary": "Custom status item view that can be highlighted programmaticallly.",
    "description": "                       `NSStatusItem` can be highlighted only if it is clicked.  n                       It's a problem if you want to show your original popup programmatically.nn                       QBStatusItemView can be set to the `view` property of `NSStatusItem` and can be highlighted programmatically.  n                       So it is useful for apps that uses original popup instead of `NSMenu`.n",
    "homepage": "https://github.com/questbeat/QBStatusItemView",
    "license": "MIT",
    "authors": {
        "questbeat": "[email protected]"
    },
    "source": {
        "git": "https://github.com/questbeat/QBStatusItemView.git",
        "tag": "1.0.2"
    },
    "social_media_url": "https://twitter.com/questbeat",
    "platforms": {
        "osx": "10.6"
    },
    "requires_arc": true,
    "source_files": "Classes"
}

Pin It on Pinterest

Share This