if(device == iPad),if(device == iPhone) [英] if (device == iPad), if (device == iPhone)
本文介绍了if(device == iPad),if(device == iPhone)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我有一个通用应用程序,我正在设置 UIScrollView
的内容大小。显然,iPhone和iPad上的内容大小会有所不同。如何设置iPad的特定尺寸以及iPhone和iPod touch的其他尺寸?
So I have a universal app and I'm setting up the content size of a UIScrollView
. Obviously the content size is going to be different on iPhones and iPads. How can I set a certain size for iPads and another size for iPhones and iPod touches?
推荐答案
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// The device is an iPad running iOS 3.2 or later.
}
else
{
// The device is an iPhone or iPod touch.
}
这篇关于if(device == iPad),if(device == iPhone)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文