Monthly Archives: December 2010

Code formatting

In this post, I’ll give a quick overview on choosing a personal coding style, and present a way to auto-format code in bulk. If you take your code seriously, you probably have a code style that you consistently use. For example, maybe you always use braces with every if clause, or you use underscores in […]

BNPieChart

This post introduces a new open-source iOS pie chart class, BNPieChart. ┬áIt’s designed to draw beautiful, scalable pie charts with a dead-simple interface. To get the class, just click the Downloads button from the moriarty github page. This chart: is produced with this code: BNPieChart *chart = [[[BNPieChart alloc] initWithFrame:frame] autorelease]; [chart addSlicePortion:0.1 withName:@"Orange"]; [chart […]

An upgrade from UIColor

This post introduces the BNColor class, a versatile color object that can be easily changed, saved to disk, and offers live switching between HSV and RGB color spaces – all features that are missing from the built-in UIColor class. Sample code The easiest way to see what the class can do is by example: BNColor […]