Since the iPad is running iOS3.2, your code should handle both.
if ([[UIDevice currentDevice].systemVersion isEqualToString:@"4.0"]) { [self doOs4Stuff]; } else { [self doOs3Stuff]; }
Although you should be careful using specific API 4.0 when loading classes using tricks like NSClassFromString() to prevent it from crashing in older versions of the OS.
In my example, it would be possible to use a more reliable version check, it can analyze the string to check if, for example, the main version is "4" or "3".
source share