Matt Legend Gemmell Modesty is Lying

Mac OS X Cocoa and iPhone Development Services available at Instinctive Code.
Favorites icon
Favorites for iPhone
Speed-dial with style.
Mac OS X Cocoa and iPhone Developer for hire

Other Pages

Categories

Posts on Source

How to get a Quick Look preview as an NSImage

I wrote a quick category on NSImage allowing you to get an image containing a Quick Look preview of the file at a given path. You can specify the size, and whether the preview should be rendered as an icon (i.e. with a document border, drop-shadow, page-curl and file type/extension label superimposed). So, you can [...]


MGViewAnimation update

Another slight update to MGViewAnimation (available on the Cocoa Source Code page). This one just adds an override of the -stopAnimation method to behave like NSViewAnimation’s does (i.e. move all animations to their end frame), and a slight optimization. I also got around to including the license in the actual download.
Same license as before, and [...]


Setting the text color of an NSButton

I wrote a little category on NSButton tonight to allow getting/setting the color of the label text, e.g. on checkboxes and such. Handy for putting controls in HUD Windows, where you’ll usually want white text instead of the default black.
Since the code is so short, I decided to make it the inaugural entry on pastebuffer.com, [...]


MAAttachedWindow NSWindow subclass

I once again come bearing gifts for you: this time it’s MAAttachedWindow, an NSWindow subclass that lets you visually attach borderless windows to other windows or just to specified points on the screen. It’s potentially useful for displaying contextual help, options related to a part of your UI, or just for drawing attention to things.
Take [...]


MATrackingArea for NSView

Tracking rectangles in NSViews, eh? They’re kind of crap. Getting the events is a bit hit-and-miss, and if you move the mouse too fast you’ll often find that you miss a mouseExited: event and your view is left looking stupid. It’s an old problem, and it’s very annoying. It certainly annoys me.
Rumour has it that [...]


← Before After →