1. Put this where all your constants and defines go:
#define IS_IOS5_OR_BELOW ([[[[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."] objectAtIndex:0] intValue] < 6)
2. Use this way:
if(IS_IOS5_OR_BELOW){
// iOS 4-5 code
} else {
// iOS 6 code
}
Hope this snippet can help you differentiating between version of iOS, mostly when iOS 6 is coming and you want to be ready for it :)