Tentative open-source steps

Over the last couple months, I've been quietly publishing to my BWToolkit fork. I thought I'd take the time today to write a brief post on what's there. Hopefully at some point Brandon will merge some of these back in to his master.

BWTabViewController

Like UITabBarController but for the Mac. There's no UITabBar equivalent yet; instead this matches the contents of an NSTabView with the viewControllers array.

The Interface Builder plug-in is incomplete — you can drag the controller in from the BWToolkit palette, but no functionality is exposed there other than NSViewController's built-in properties.

To use, you can let the controller build its own TabView by calling -view. Or, connect to an existing TabView (in a nib or with a -setTabView: call) whereupon it will take over control of that view.

BWToolbarPullDownItem

There seem to be dozens of popup/pulldown toolbar item implementations across the web, so of course I had to add one more! More seriously, all those I've seen seem to fall down by customising the popup behaviour more than I'd like. This one is very clean.

No Interface Builder plug-in yet, so create programatically and to a toolbar. For the most part, existing NSToolbarItem methods do everything you want, but to populate the menu:

[[item popUpButton] addItemWithTitle:@"foo"];

BWIWorkPopUpButton

Used by BWToolbarPullDownItem in its implementation. Like a regular NSPopUpButton, but when borderless expands the image rect and draws its own custom arrow at the bottom-right.

© Mike Abdullah 2007-2015