3 ms·
Looks great, thank you for sharing! A question I have about macOS development - where should I start in order to learn how to make menu bar and shortcut driven
by nikolatt 6y ago
Looks great, thank you for sharing!
A question I have about macOS development - where should I start in order to learn how to make menu bar and shortcut driven UIs?
- dep_b 6y agoRay Wenderlich has a nice basic tutorial around creating a simple menu bar application. I just used it for my own application and it seems well up-to-date. I thought it was this one: https://www.raywenderlich.com/450-menus-and-popovers-in-menu-bar-apps-for-macos https://www.raywenderlich.com/450-menus-and-popovers-in-menu... A global hotkey is not something I have experience with but it seems that there's a library called Hotkey: https://stackoverflow.com/questions/47760135/global-keyboard-shortcuts-for-a-mac-tray-app https://stackoverflow.com/questions/47760135/global-keyboard...
- startingpoint 6y agoThat's pretty much the same place where I started as well (the RW tutorial). For the library: HotKey is exactly what I used. Simple to set up, works with the Xcode Package manager and does exactly what it says.
- nikolatt 6y agoCool, thank you both for the information!
- programmarchy 6y agoPlease, don't forget about the Dock! I personally hate when apps crowd my Menu Bar when they don't need to e.g. Dropbox, NordVPN, Keybase etc. I always try to disable the Menu Bar icon for an app if possible, and if I can't I will delete the app if I can find a suitable alternative. There are so many advantages to a dock icon: - Richer, colorful icon - Support for badges, configurable by user - Won't be hidden by the system (macOS will hide icons in a crowded Menu Bar) - Can be hidden by the user (Dock Autohide) - Icon can be repositioned by the user The Apple HIG makes it pretty clear that most apps don't need the Menu Bar, and should use the Dock instead. But we're in a vicious circle where users have been trained to use the Menu Bar (even though it's inferior), so that's what developers do.
- nikolatt 6y agoHadn't thought about that! Thank you for the remark, will definitely keep it in mind.