CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

PopStatusItem 0.5.0

PopStatusItem 0.5.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2016
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Adam Hartford.



PopStatusItem

Shows an NSPopover from the status bar. Works with Mission Control and Spaces. Supports dark mode.

Screenshot

Installation

CocoaPods:

platform :osx, '10.10'
use_frameworks!

pod 'PopStatusItem'

Carthage:

github 'adamhartford/PopStatusItem'

Usage

let popStatusItem = PopStatusItem(image: NSImage(named: "buttonImage")!)

func applicationDidFinishLaunching(aNotification: NSNotification) {
    let storyboard = NSStoryboard(name: "Main", bundle: nil)
    popStatusItem.windowController = storyboard.instantiateControllerWithIdentifier("PopStatusItem") as? NSWindowController
}

// Manual actions
popStatusItem.togglePopover()
popStatusItem.showPopover()
popStatusItem.hidePopover()

Options

popStatusItem.highlight = true // Highlights status bar icon. Default is false.
popStatusItem.activate = true // Makes popover window active. Default is false.

Usage, or to recreate the demo application:

  1. Add LSUIElement=YES to Info.plist.
  2. Uncheck “Is Initial Controller” in Main.storyboard window controller.

License

PopDatePicker is released under the MIT license. See LICENSE for details.