开发者

How can I detect which system my App Store application is running on?

开发者 https://www.devze.com 2023-01-02 02:23 出处:网络
I am developing a Cocoa Touch application for Apple\'s App sto开发者_运维百科re and I want to do some tweaking in the code depending on what device it\'s running on. How can I tell?I\'ve used this in

I am developing a Cocoa Touch application for Apple's App sto开发者_运维百科re and I want to do some tweaking in the code depending on what device it's running on. How can I tell?


I've used this in a Universal app to determine if the code is running on an iPad

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) 
{
    // Do iPad only stuff here
}


Check out the documentation for UIDevice


Look at UIDevice and it's properties. There is a systemVersion string that will work for what you want.

0

精彩评论

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