Useful Objective-C stuff
Objective-C Shell
Latest commit b3dfbc6 Jul 1, 2013 @atomicbird Add license
Failed to load latest commit information.
Sample Code/SetJSONDemo Add code to also check the ivar name of the target object, if no matc… Aug 23, 2012
LICENSE
NSData+reallyMapped.h
NSData+reallyMapped.m Update file size code. Feb 21, 2012
NSObject+deallocBlock.h Add NSObject+deallocBlock and NSData+reallyMapped Feb 15, 2012
NSObject+deallocBlock.m Add NSObject+deallocBlock and NSData+reallyMapped Feb 15, 2012
NSObject+setValuesForKeysWithJSONDictionary.h Initial commit, adding NSObject+setValuesForKeysWithJSONDictionary Feb 15, 2012
NSObject+setValuesForKeysWithJSONDictionary.m Add code to also check the ivar name of the target object, if no matc… Aug 23, 2012
README.md Update README to mention Daniel Jalkut's original zsh version of the … Jun 2, 2012
fixpng.sh Add fixpng.sh for convenient fixing of iOS-optimized PNGs. Jun 2, 2012

README.md

Atomic Tools

A collection of useful Objective-C code and other items of use to iOS and Mac OS X developers. Most of this has been blogged about at Cocoa is my Girlfriend.

  • NSObject+setValuesForKeysWithJSONDictionary.h: Safer alternative to setValuesForKeysWithDictionary: for use when importing JSON. Works with any object with declared properties corresponding to JSON dictionary keys. Detailed discussion is at CIMGF.

  • NSObject+deallocBlock.h: Add a block to any object that will execute when that object is deallocated. Described in detail at CIMGF.

  • NSData+reallyMapped.h: Create an NSData object using a memory mapped file. Works even though dataWithContentsOfMappedFile: is deprecated in iOS 5.0 and NSDataReadingMappedAlways doesn't always (despite the name) create memory mapped instances. Described in detail at CIMGF.

  • fixpng.sh: Two bash functions useful for converting iOS-optimized PNGs back into standard PNGs. These functions rely on the xcrun command-line tool and probably require that Xcode 4.3 or higher be installed. Based on Daniel Jalkut's zsh version.

Important note

All Objective-C code in this repository is designed for use with automated reference counting (ARC). If you are not using ARC you may experience memory leaks or worse.