Syntax Formatter for Xcode / by Brian Lambert

Some time ago I wrote a nice little utility for people who blog about iOS and OS X development called Syntax Formatter.  Well, I'm happy to say it's still there, it still works, and it allows one to post very nicely-formatted code snippets from Xcode to a blog.

Here's an example:

// Class initializer.
- (id)initWithFrame:(CGRect)frame
    // Initialize superclass.
    self = [super initWithFrame:frame];
    // Handle errors.
    if (!self)
        return nil;
    // Initialize the view.
    [self setOpaque:NO];
    [self setClipsToBounds:YES];
    [self setBackgroundColor:[UIColor blackColor]];
    // Allocate, initialize, and add the home view.
    _homeView = [[HomeView allocinitWithFrame:[AppContext screenRect]];
    [_homeView setDelegate:(id <HomeViewDelegate>)self];
    [self addSubview:_homeView];
    // Done.
    return self;

As you can see, it looks just like Xcode's Default Fonts & Colors.

It's free! Have fun!