License

All of my source code on this page is available under the BSD License.

Some archives may contain code from third parties that may have different licensing conditions. Please read the accompanying documentation.

Additionally, in case you use some of my code in your application, it would be nice if you gave me credit in the docs or where you feel it's appropriate. Thank you.

Andreas

Comments (0)

iOS Help Viewer

This iOS project lets you flip through static HTML pages using an UIPageControl.

Page Control

As the name implies, I wrote this to include help pages into my iOS app.

Latest version with support for iPad and landscape orientation.

HelpViewer.zip — 2011-04-21 — 82 KB  

Comments (8)

Mac OS AMButtonBar

Create a bar of buttons, similar to those in iTunes 6 or in the Finder search pane.

Button Bar Sample

ButtonBar.zip — 2011-09-08 — 93 KB  

Comments (0)

Mac+iOS CheckerboardColor Category

A small NSColor category to create a pattern color like the one shown here.

Checkerboard Pattern

The demo project also includes a simple NSView subclass to draw a view filled with a single color.

CheckerboardPatternTest.zip — 2011-09-08 — 50 KB  

Comments (1)

Mac OS AMCollectionView

AMCollectionView is used to display a vertical list of items.
The display of each item is determined by a prototype item and a content object.

Collection View Sample

While AMCollectionView is somewhat similar to NSCollectionView, it has a lot less features.
On the positive side, it's compatible with Tiger and you get the source.

Note:
If you are able to target Lion, you may want to use a view based NSTableView instead. See Table View Programming Guide — View-Based Table Views.

AMCollectionView.zip — 2011-09-08 — 180 KB  

Comments (0)

Mac OS AMFloatingImage

This is an NSWindow subclass, made to display a floating image.

Floating Image under Cursor

The window will ignore any user input. But you can move it around programatically and even have it track the current mouse position.

FloatingImageDemo.zip — 2011-09-08 — 60 KB  

Comments (5)

Mac OS AMIndeterminateProgressIndicatorCell

Indeterminate progress indicator cell. Will work at any size.

Progress Indicator Cell

Also included is a controller class for table columns with progress indicators. (screen shot)

ProgressIndicatorCell.zip — 2011-09-08 — 75 KB  

Comments (1)

Mac OS AMPreferencePane

This set of classes and protocols is used to build, organise and display preference panes. The preferences window allows the same kind of display and sorting of panes as Apple's System Preferences. Preference panes may be build in to the application or provided as loadable bundles.

Example code is included.

Tigger uses these classes for it's plug-ins. (screen shot)

AMPreferencePane.zip — 2011-09-08 — 152 KB  

Comments (2)

Mac OS AMRemovableColumnsTableView

Adds a facility to NSTableView that lets you easily hide and show columns.

Note:
As of 10.5 you can simply hide table columns. See NSTableColumn Class Reference — setHidden:.

AMRemovableColumnsTableView.zip — 2011-09-08 — 127 KB  

Comments (1)

Mac OS AMRollOverButton

Rollover buttons highlight when you move the mouse pointer over them. The appearance is widely configurable.

Rollover Button Samples

You can also attach a menu which will be indicated by a small triangle inside the button.

The latest version was restructured and is compatible with Lion. Design your buttons with the Button Builder. For more information see the included readme.

RollOverButtonTest.zip — 2011-09-08 — 140 KB  

Comments (27)

Mac OS AMSerialPort
A collection of classes to access serial ports.
This code is originally based on the Serial Port Sample from Apple.
Credits to Nick Zitzmann (www.chronosnet.com) for the added/removed port notifications and Sean McBride for helping with the API redesign as well as the implementation and testing of all new code.
The project is now hosted on Sourceforge.

AMSerialTest.zip — latest version from sourceforge — 40 KB  

Comments (0)

Mac OS AMShapedButton
A subclass of NSButton that supports irregular shaped buttons. I did this to implement a directional arrows control like in Apple's DVD player. This is not normally possible with standard buttons since those would overlap.
Apart from that you get a category to NSImage that returns a tinted version of an image.

ShapedButtonTest.zip — 2011-09-08 — 134 KB  

Comments (2)

Mac OS AMShellWrapper
Based on TaskWrapper from Apple's Moriarity sample code, use this class to run commandline tools from your application. Connect your own methods to stdout and stderr, get notified on process termination and more.

AMShellWrapper.zip — 2011-09-08 — 66 KB  

Comments (0)

Mac OS AMToolTipTableView

This subclass of NSTableView allows you to display different tool tips for each cell. Change your table view's class to AMToolTipTableView, add one additional method to your data source and you are done.

Note:
Apple added this functionality to AppKit in Mac OS X 10.4. See the AppKit Release Notes for Tiger.

AMToolTipTableView.zip — 2011-09-08 — 6 KB  

Comments (0)

Mac OS AMURLLoader

After experimenting with NSURLRequest/NSURLConnection I decided that those classes are still too complicated to use. So I wrote AMURLLoader which does all the work. You just create a loader and receive the result when it's finished. The sample app retrieves the favicon for a site.

AMURLLoader.zip — 2011-09-08 — 72 KB  

Comments (0)

Mac OS AMWindow

A small NSWindow subclass that implements an improved zooming behaviour and makes it easy to allow or deny zooming and/or resizing of a window. If zooming is not allowed, the zoom button will be disabled. Also, the resize indicator will be added or removed as required.

AMWindow.zip — 2011-09-08 — 6 KB