Updated for iOS 4 - 6.