Added support for iOS 6

Reviewed methods used that were only available for iOS 7