Search code examples
objective-cmacosswiftmenubar

Creating menulet osx app with custom view in swift


Has anyone been able to make menulet osx app with custom view. There is really nice Objective-C example here: https://github.com/djromero/PopoverMenulet but no idea how to convert into Swift


Solution

  • In 10.10 NSStatusBar.setView has been deprecated and I guess this is the main reason this can not be implemented in Swift https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSStatusItem_Class/#//apple_ref/doc/uid/20000248-SW3

    see section: Managing a Custom View