Performing black magic with objective-c