开发者

iPad Development detecting the device's version

开发者 https://www.devze.com 2023-01-31 06:39 出处:网络
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.

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]

0

精彩评论

暂无评论...
验证码 换一张
取 消