Added check for iOS6 vs iOS7 to run either un-deprecated graphics code for iOS6 or replacement graphics code that runs only in iOS7