Possible Duplicate:
Check iPhone iOS Version
One of the changes made in iOS 5 is the ability to override the drawrect
methods. This means I need to change the appearance of the navigationBar and tabBar on a different way. I am able to use apple new methods:
[[UINavigationBar appearance]setBackgroundImage:[UIImage imageNamed:@"navigationBarBackgroundRetro.png"] forBarMetrics:UIBarMetricsDefault];
//I create my TabBar controlelr
tabBarController = [[UITabBarController alloc] init];
// I create the array that will contain all the view controlers
[[UITabBar appearance] setBackgroundImage:
[UIImage imageNamed:@"navigationBarBackgroundRetroTab.png"]];
[[UITabBar appearance] setSelectionIndicatorImage:
[UIImage imageNamed:@"tab_select_indicator"]];
I'm developing an app for iOS 4.3 and 5.0. However, iOS 5 ignores the drawrect
method that I'm overriding, so it should run the above code. How can I check the iOS version so I can use the above code if the device is on iOS 5?