且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

API来确定是否在iPhone或iPad上运行

更新时间:2023-02-22 12:08:20

Checkout UI_USER_INTERFACE_IDIOM

Checkout UI_USER_INTERFACE_IDIOM.


返回当前设备支持的接口idiom。

Returns the interface idiom supported by the current device.

返回值 br>
UIUserInterfaceIdiomPhone (如果设备是iPhone或iPod touch)或 UIUserInterfaceIdiomPad

Return Value
UIUserInterfaceIdiomPhone if the device is an iPhone or iPod touch or UIUserInterfaceIdiomPad if the device is an iPad.

UIUserInterfaceIdiom

用于当前设备



typedef enum {
   UIUserInterfaceIdiomPhone,
   UIUserInterfaceIdiomPad,
} UIUserInterfaceIdiom;