• tel: 0845 475 2487 (UK)

Scale-9 in Objective-C Cocoa on the Mac

Developed by Jon

Having used flash extensively for the last few years I have really come to rely on using Scale-9 scaling on UI elements in the rich internet apps I design and develop. It is a great technique for things like rounded rectangles, button graphics etc and ensuring the rounded corners do not distort when stretched.

I have recently been doing Cocoa Development on Mac OS X 10.5 and was looking for a way to do this in Cocoa and came across a great drawing method named NSDrawNinePartImage. The method has the following signature:

void NSDrawNinePartImage(NSRect frame,
   NSImage *topLeftCorner,
   NSImage *topEdgeFill,
   NSImage *topRightCorner,
   NSImage *leftEdgeFill,
   NSImage *centerFill,
   NSImage *rightEdgeFill,
   NSImage *bottomLeftCorner,
   NSImage *bottomEdgeFill,
   NSImage *bottomRightCorner,
   NSCompositingOperation op,
   CGFloat alphaFraction,
   BOOL flipped
);

Read more…

Great 404 Page Idea

Developed by Simon

I came across a great 404 page the other day and thought I would share it. The page at first glances looks like any other but if you read the text, you will see that they have redeemed themselves for the broken link by offering me a discount of $3 off any of their products.

Picture 1.png

This is a great way to capture the interest of would be browsers that would normally see this page and immediately hit the back key, instead not only do they capture my attention, but they also tap into my curiosity which gets me to immediately click the products link.

In this case I didn’t need any of their products but this is a great tip.

Also note the search bar being visible. This is essential on a 404 page for keeping customers that know what they are looking for on your site.