Cocoa iOS/OSX Commonly Useful Code