ios 判断当前设备

 if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
    {
        CGSize result = [[UIScreen mainScreen] bounds].size;
        
        if(result.height == 480.f)
        {
            return @"ViewController";
        }
        else
        {
            return @"ViewController-iPhone5";
        }
    }

    return @"ViewController-iPad";

你可能感兴趣的:(ios 判断当前设备)