Updated for iOS 7 and iPhone 5.