I have an iPad app that makes use in UIPrintInfo (that is being supported from iOS 4.2 and above). I 开发者_如何转开发want my app to run on previous iOS version such as 3.2. How can I detect in my code the device's iOS version and make the necessary changes according to the device's version?
Thanks in advance,
Class printInfoClass = NSClassFromString(@"UIPrintInfo");
if (printInfoClass != nil )
{
id printInfo = [printInfoClass printInfo];
// Do something
}
Use
[[UIDevice currentDevice] systemVersion]
精彩评论