modentime

+ (BOOL)getIsIpad

{

    NSString *deviceType = [UIDevice currentDevice].model;

    

    if([deviceType isEqualToString:@"iPhone"]) {

        //iPhone

        return NO;

    }

    else if([deviceType isEqualToString:@"iPod touch"]) {

        //iPod Touch

        return NO;

    }

    else if([deviceType isEqualToString:@"iPad"]) {

        //iPad

        return YES;

    }

    return NO;

}


// 如果判断当前ui布局,ipad也可能返回iphone布局,则用如下方法

 

    if ([[UIDevice currentDevice] userInterfaceIdiom] ==

        UIUserInterfaceIdiomPad)

        return YES;

    else{

        return NO;

    }
原文链接:https://blog.csdn.net/feifeiwuxian/java/article/details/58298462

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-07-20
猜你喜欢
  • 2021-10-05
  • 2021-07-14
  • 2021-12-13
  • 2021-11-14
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案