if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
{
// 平板
}
其他的状态:
UIUserInterfaceIdiomPhone
UIUserInterfaceIdiomPad
UIUserInterfaceIdiomTV
UIUserInterfaceIdiomCarPlay
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
{
// 平板
}
其他的状态:
UIUserInterfaceIdiomPhone
UIUserInterfaceIdiomPad
UIUserInterfaceIdiomTV
UIUserInterfaceIdiomCarPlay
本文标题:判断当前设备是ipad还是iphone
本文链接:https://www.haomeiwen.com/subject/joqazttx.html
网友评论