Posted: June 18th, 2009 | Author: Brandon Walkin | Filed under: Releases | 9 Comments »
BWToolkit 1.2 is out with three new additions along with other improvements and fixes. The first addition is a gradient box which lets you draw a rectangle with a gradient or solid color. It also has optional border and inset lines. The next addition is a styled text field which lets you apply a gradient and a shadow to text. An example of what you’ll be able to create in Interface Builder with these two additions is this fancy header bar in Capo. The last addition is a hyperlink button that lets you link text or images to URLs which will open in the browser.
For a complete list of what’s new in 1.2 and to download the plugin and framework, visit the BWToolkit website.
Posted: February 24th, 2009 | Author: Brandon Walkin | Filed under: Releases | Comments Off on BWToolkit 1.1: Codeless Split Views
I’m pleased to announce that BWToolkit 1.1 is now available for download with a brand new split view. The new BWSplitView has three main features:
- Subview autosizing: In the inspector, the developer can tell the split view which subviews should resize with the window and which should remain at a fixed size. The standard behavior of NSSplitView is to ignore the autosizing masks on the subviews and resize them proportionally as the split view resizes. This is not the desired behavior for most applications. BWSplitView honors each subview’s autoresizing mask which is easily configurable in both the BWSplitView inspector and the subview’s size inspector.
- Constraints: Each subview’s minimum and maximum size is configurable in the BWSplitView inspector. You can specify the size in points or as a percentage of the split view’s size.
- Collapsing: BWSplitView has powerful new collapsing functionality. A view marked as “collapsible” in the inspector will collapse when its divider has been double clicked and when the user tries to make the view smaller than its minimum size. You can also hook up a toggle button to the split view’s toggleCollapse: action which will collapse or expand the subview using Core Animation. The split view takes care of synchronizing its state with the toggle button, so the button never shows the opposite indication.
The reason I call the split view “codeless” is that for the vast majority of use cases, the developer will not have to write a single line of code to get the split view functionality they desire. For other use cases that do require something out of the ordinary, the developer can set themselves as the delegate on the split view and implement any relevant delegate methods.
In the video below, I create iCal’s split view layout, with maximum and minimum sizes for subviews, subview collapsing with animation, and proper autoresizing behavior, all within Interface Builder – and it takes less than 3 minutes.
I’d love to hear your thoughts on the split view and any ideas you may have for improvements. Drop me a line or file a bug.
And a big thanks to Fraser Kuyvenhoven for developing the split view’s resizing algorithm.
Source Code
Posted: November 19th, 2008 | Author: Brandon Walkin | Filed under: Releases | Comments Off on BWToolkit 1.0.2
BWToolkit 1.0.2 is now out with some added functionality. The selectable toolbar has some new methods for setting its selected item, which is useful if you want to display the window with a certain tab selected, or want to select a certain tab from within another tab. You specify which item should be selected by passing in the item identifier, which is a unique, non-localizable string.
To make this process simpler, a new item has been added to the plugin to allow you to easily specify a toolbar item’s identifier in Interface Builder. This item can be used with standard toolbars as well as selectable toolbars.
As for other improvements, the size of the framework bundle has been reduced by 40% by using Apple’s TIFF compression instead of Adobe’s and a few bugs have been fixed. See the release notes for details on the particular bug fixes.
Source Code