iOS 设备检测:SDiPhoneVersion

jopen 10年前

SDiPhoneVersion 是 Objective-C 库,用来检测运行设备模式和屏幕大小。

How to use          //Check for device model        if ([SDiPhoneVersion deviceVersion] == iPhone6)             NSLog(@"You got the new iPhone 6. Nice!");        else if ([SDiPhoneVersion deviceVersion] == iPhone6Plus)             NSLog(@"You got the iPhone 6 Plus. Bigger is better!");        else if ([SDiPhoneVersion deviceVersion] == iPadAir)           NSLog(@"You own an iPad Air!");          // Check for device screen size        if ([SDiPhoneVersion deviceSize] == iPhone4inch)             NSLog(@"Your screen is 4 inches");          //Get device name        NSLog(@"%@",[SDiPhoneVersion deviceName]);        /* e.g: Outputs 'iPhone6,2' */

iOS 设备检测:SDiPhoneVersion

项目主页:http://www.open-open.com/lib/view/home/1412905965061