Fix warnings

Removed warnings by removing deprecated calls when compiling for iOS7 or more.