Archive for December, 2010

Custom Allocators

Here’s another of those digging into the runtime guts posts of Mike Ash’s worth reading:

Friday Q&A 2010-12-17: Custom Object Allocators in Objective-C

Finding your allocations too slow? Well, go write your own caching (or whatever) allocator then!

Another good reason to know how to do this, as pointed out in the comments, is if you’re working with crypto code (or any sensitive information, really) and it would be prudent to zero out memory after yourself when dealloced.

Continue Reading →


So everyone who’s done any Cocoa programming probably has an NSLog wrapper conditionally compiled on DEBUG for their development ease, but we seem to have seen quite a bit of gushing lately about this NSLogger project on github, so let’s take a look at the description and the Slideshare presentation here and see if it’s really all that, shall we?

NSLogger is a high perfomance logging utility which displays traces emitted by client applications running on Mac OS X ...

Continue Reading →

State of the App Store

Here’s some interesting information for you:

The State of the iOS App Store [INFOGRAPHIC]

Splits up available apps by price, category, platform, etc.

Particularly intriguing was this data point:

“Number of unique developers: 62,126″

Presumably they mean “the number of developer accounts offering apps for download”. But how many is that, actually? Take us, for instance, personally we’re the only developer behind all the apps in one, two, three … twelve different accounts total it looks like. So if everyone was like us, there’s ...

Continue Reading →

Illustrator Level Design

This is an interesting read for you:

How to use Illustrator, SVG, TouchXML and XPath for simple level design, meshes and other game data

… we wanted to try using Illustrator as a level/track design tool. Whilst we could’ve easily used Vertex Helper or similar for the Dwarf Derby project, Dead West has a complicated, layered set of co-ordinate-based game data (that Illustrator is well suited to managing).

The plan (and thus far successful execution) was this:

  1. Create nav mesh (just triangles for ...
Continue Reading →

iPod Library Sampling

So you want to play with audio from the user’s iPod library? You good with requiring 4.1 for your app? Then you should read

From iPod Library to PCM Samples in Far Fewer Steps Than Were Previously Necessary

iOS 4.1 added a number of new classes to AV Foundation (indeed, these were among the most significant 4.1 API diffs) to provide an API for sample-level access to media. The essential classes are AVAssetReader and AVAssetWriter. Using these, we can dramatically ...

Continue Reading →

Tip: iOS Fonts

Would you like a handy reference for rendered images of all the currently available fonts on iPhone and iPad? Here you go then:

iOS Fonts – ‘A Place for Happy Typography’

h/t: @Dylan_Beadle!

Continue Reading →


If you have any involvement with Amazon Web Services stuff, you’ll probably find this of interest:

New AWS SDKs for Mobile Development (Android and iOS)

The AWS SDK for Android and the AWS SDK for iOS provide developers with access to storage (Amazon S3), database (Amazon SimpleDB), and messaging facilities (Amazon SQS and Amazon SNS). Both SDKs are lean and mean to allow you to make the most of the limited memory found on a ...

Continue Reading →

Transparent Toolbars

Aaaaaand continuing on from yesterday’s ‘good reasons to use method swizzling’ theme, let’s say that you want to have a couple standard UIBarButtonItems beside each other in a navigation bar, like this:


Now, every time we’d done this before, we’d used custom buttons; just stick them in a view, set leftButtonsItem to use that custom view, done. Same way as the custom title view shown there. But you can’t put UIBarButtonItems in ...

Continue Reading →

Tip: Custom User Agent

So remember waaay back when we mentioned how to go about messing with the undocumented internals of UIWebView if you needed to call -setCustomUserAgent for some good reason? Well, we’ve always been mildly nervous about that approach … but now, here is a rather safer way to go about things:

UIWebView user-agent weirdness and how to change user-agent value programmatically

which uses the technique described here,

Changing the headers for UIWebKit HTTP requests

to do some swizzling of NSMutableURLRequest’s setValue:forHTTPHeaderField: method.

A ...

Continue Reading →


Here’s an object with a handy set of extended capabilities from UIColor:

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.

And hex/decimal/percent string accessors too. Beats writing it yourself!

Continue Reading →
Page 1 of 2 12