iOS 8 checking

Hello! You use unsafe ios8 checking.
Your code is not work on ios6. I repaired it.