I've seen various methods of checking the iOS version of the device.
From some example in Apple Documentation :
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
    // < = 6.1
} else {
    // > = 7
}
And from many examples over SO / Internet :
[[UIDevice currentDevice] systemVersion]
What is the difference between NSFoundationVersionNumber and [[UIDevice currentDevice] systemVersion] ?
And which one should we use ?
 
     
    