Updated for iOS 7 deprecation