BWToolkit
Plugin for Interface Builder 3

Version 1.2.1
June 18, 2009
Brandon Walkin

Installation

Step 1. Double click the BWToolkit.ibplugin file to load the plugin into Interface Builder

Note: Interface Builder will reference this file rather than copy it to another location. Keep the .ibplugin file in a location where it won't be deleted.

Step 2. In the Xcode project you want to use the plugin in:
	•	Right click the Linked Frameworks folder and click Add -> Existing Frameworks. Select the BWToolkitFramework.framework directory.
	•	Right click your target and click Add -> New Build Phase -> New Copy Files Build Phase. For destination, select Frameworks, leave the path field blank, and close the window.
	•	Drag the BWToolkit framework from Linked Frameworks to the Copy Files build phase you just added.

Note: You'll have to repeat step 2 for each project you want to use BWToolkit in.

If you need to reference BWToolkit objects in your classes, you can import the main header like so:

#import <BWToolkitFramework/BWToolkitFramework.h>

License

All source code is provided under the three clause BSD license. Attribution is appreciated but by no means required.

Contributing

Please email any patches to me at bwalkin@gmail.com.

Compatibility

BWToolkit has been tested to work in IB 3.1.2 (677) and IB 3.2 (731). 

History

1.2.1 - June 18, 2009
	•	The gradient box, hyperlink button, and styled text field header files have been made public so they can be accessed from your classes.

1.2 - June 18, 2009
	•	New Gradient Box with customizable border and inset lines
	•	New Hyperlink Button that allows you to link text or images to URLs
	•	New Styled Text Field that allows you to apply a gradient and a shadow to your text
	•	Added support for Snow Leopard
	•	The Anchored Button Bar can now live in the right-most split view pane. Just drag the bar in there and the resize handle will move over to the left side. 
	•	Rewrote Transparent Button and Transparent Pop-Up Button to support image alignment, text justification & truncation, and other standard cell functionality. A similar rewrite will be coming to the Anchored Button & Pop-Up Button soon.
	•	Fixed an issue where some cells could "take over" other objects in your interface
	•	Fixed an issue where some images in an Anchored Button & Pop-Up Button would draw upside-down
	•	Sheet controller ivars can now be accessed and modified from outside the class
	•	Fixed an issue where bottom bars would output warnings to the console
	•	Fixed some memory leaks

1.1 - Feb 23, 2009
	•	New BWSplitView with:
	⁃	Customizable min and max sizes for subviews
	⁃	Ability to specify which subviews should and shouldn't resize through a control in the inspector (which just sets the subview's autoresizing mask)
	⁃	Collapsing functionality
	-	Double click divider to collapse
	-	Drag a divider past half of the subview's minimum width to collapse
	-	Animated collapse: hook a Toggle button up to the split view's toggleCollapse: action to collapse the subview configured as collapsible. The split view will synchronise its state with the button.
	•	Removed all split view size constraint functionality from the anchored button bar since BWSplitView handles that now
	•	Replaced the old colors and fonts icons with the new ones from iWork '09
	•	Textured slider: fixed bug where certain areas on the slider weren't clickable, zoom buttons now send an action, and fine tuned mouse scrolling behavior (courtesy of Chris Liscio)
	•	Selectable toolbar: fixed issue where a focus ring would stay visible on a tab change (courtesy of Duncan Wilcox)
	•	Can now customize the font on BWTokenField in IB
	•	Fixed various memory leaks

1.0.4 - Jan 20, 2009
	•	Added ability to programmatically disable toolbar items in the selectable toolbar
	•	Added a notification to the selectable toolbar that gets sent whenever a toolbar item has been clicked (see header for details)
	•	Added main header file for easy importing
	•	Fixed issue where the BWToolbarItem inspector wouldn't be updated with the item identifier
	•	There's been an API change in BWSheetController. The delegate method now gets passed the button that initiated the sheet close. This is helpful because in the event that there are multiple buttons hooked up to the messageDelegateAndCloseSheet: method, you can distinguish which button called the method and behave accordingly.
	•	Fixed disabled appearance for BWAnchoredPopUpButton
	•	Fixed a bug where a sheet not using BWSheetController could be moved around by its bottom bar
	•	Fixed toolbar item memory leaks

1.0.3 - Dec 18, 2008
	•	64-bit support (courtesy of Rob Rix)
	•	Added disabled appearance and scroll wheel support to BWTexturedSlider
	•	The selectable toolbar panes are now keyboard accessible
	•	Anchored button bar now lets you provide your own delegate implementations for the split view (see the header for details)
	•	Nearly all the headers have been made public
	•	Fixed memory leaks
	•	Minor bug fixes

1.0.2 - Nov 19, 2008
	•	Added a toolbar item with a customizable item identifier
	•	New methods in the BWSelectableToolbar header for programmatically setting the selected toolbar item
	•	Reduced the file size of the framework by 40%
	•	Made the headers for BWSelectableToolbar and BWSplitView public
	•	Fixed a serious bug where IB would crash whenever a window that contained a selectable toolbar had certain properties modified (like whether it had a unified toolbar or could resize)
	•	Fixed bug where if a window in IB with a bottom bar was closed and then opened, its bottom bar would disappear

1.0.1 - Nov 14, 2008
	•	Added Garbage Collection compatibility. Will now compile in GC supported and GC required apps.
	•	Minor bug fix

1.0 - Nov 13, 2008
	•	Initial Release

Known Issues

General
	•	When you build your project, you may get a warning that says "Could not find object file...". It's harmless and you can ignore it. A fix is being worked on for a future release.

Selectable Toolbar
	•	If your IB version is greater than 3.1.1 (672): Simulating is not supported for any document that has a selectable toolbar in it. The toolbar will not be able to save correctly and will be unusable. You will have to quit Interface Builder and restore to a previous version of the nib. Version control is highly recommended. You must back up your document on a consistent basis if you want to use this toolbar.
	•	Interface Builder currently has a bug where a toolbar won't remember any changes to its configuration since an item was added to it. If you take a standard toolbar, rearrange some items in it or remove a few items, it will not remember that configuration when you save the document. To work around this problem, remove an item from the toolbar and add it back before you save the document.
	•	Undo is not yet supported for active tab switching.
	•	If you want your window with a selectable toolbar to have a bottom bar, drag the bottom bar item to the window like you would normally, but repeat this for each tab in the window.
	•	When you re-order the items in the toolbar you'll have to reselect the toolbar for the "Active Tab" pop-up menu to reflect the new order.
	•	Make sure, in the outline view, not to double click an item in one of the views in the window that is not nested in the window's current content view. Doing so will cause IB to crash. Instead, switch to the tab with the item, then double click it.
	•	Use no more than one selectable toolbar per NIB/XIB. And no more than one document with a selectable toolbar should be open in IB at any particular time.
	•	Removing the separator, space, or flexible space from the toolbar's allowed items will remove all items from the toolbar.

Split View
	•	Split view attributes are not yet saved through the autosave name.
	•	The toggle action can't uncollapse a subview that's been collapsed manually by dragging the divider.
	•	For collapsing using the toggle action, there should only be 1 resizable subview in the split view other than the collapsible view (which can be either resizable or non-resizable).
	•	Undo isn't fully supported.

Bottom Bars
	•	When using the drag handles to resize certain controls positioned on a bottom bar, the window will take the click and will move while the control stays stationary. As a workaround, try holding the Control key while resizing the control. If that fails, resize it in the inspector.
	•	Bottom bars must be added to the window's content view rather than any subview.

Anchored Button Bar
	•	The inspector doesn't update when an undo action is called on a mode change. Just select the mode you want to use in the inspector.
	•	The bar should have a slightly shorter height in the third mode.

Anchored Pop Up Button
	•	Only the Pull Down type is available at the moment.

Transparent Scroll View
	•	Horizontal scrolling is not yet supported.

Acknowledgements

Thanks to Fraser Kuyvenhoven, Ali Lalani, Brent Gulanowski, and Jonathan Hess for giving me some assistance with this project.