Sample Source Code

Every now and then we produce a little snippet of code that seems self-contained enough and useful enough to share with the developer community. These snippets are not large enough to get worked up about issues of licensing or copyright; they are therefore presented to the Cocoa developer community as public domain code. Do with them as you see fit.

ClickableText

.h

.m

A subclass of NSTextField that behaves like a clickable link

Screensnap

.h

.m

Example code showing how to get a screenshot image in Cocoa

If you find these snippets useful, or make changes or extensions that you think we'd like to see, please email us and let us know! Suggestions for future snippets are also welcome, particularly if they are components of already existing Stick Software products that you suspect could be easily split out into self-contained files.

Please also note that we also have some larger open-source projects on our main developer page.