I've written before about my use of Paintcode. I love this tool and the flexibility it provides. In my latest app "Notable - Contact Notes Made Easy" I used Paintcode's awesome frame feature to create scalable activity icons. Activity icons are slightly different sizes on iPhone and iPad so I used frames to move and scale different parts of the icon as the scale changed. This way I could have just one source icon that would automatically scale gracefully.

If you are not familiar with Paintcode frames they work kinda like springs and struts in Interface Builder. You define how points, shapes, and even other frames will move and stretch.


I then used the code generated by Paintcode within a method where I could specify the width of the icon and it would calculate the height and give me back a scaled icon of the correct size.
+ (UIImage *)contactCardImageForWidth:(CGFloat)width{
// The mainFrame from Paintcode that all scaling is based off of
CGRect mainFrame = CGRectMake(0, 0, width, round(width*0.692));
return [UIImage imageWithIdentifier:BBlockImageIdentifier() forSize:mainFrame.size andDrawingBlock:^{
// Drawing code...
}];
}
There you have it, the printer icon was also setup this way. The email icon was a bit too complicated to get working with frames because of the intersecting horizontal and diagonal lines. So I just scaled up the icon by hand, but 2 out of 3 ain't bad!