- Add iPadPro
- Add DeviceInches for Simulator
@ -467,7 +467,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
@ -500,7 +500,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|||||||
@ -5,16 +5,31 @@
|
|||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "29x29",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "40x40",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"size" : "60x60",
|
"size" : "60x60",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "60x60",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
@ -44,6 +59,11 @@
|
|||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"size" : "83.5x83.5",
|
||||||
|
"scale" : "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
|||||||
6
Example/UIDevice-Utils/Images.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,23 +1,53 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "736h",
|
||||||
|
"filename" : "Default-Portrait-736h@3x.png",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "736h",
|
||||||
|
"filename" : "Default-Landscape-736h@3x.png",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "667h",
|
||||||
|
"filename" : "Default-667h@2x.png",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"orientation" : "portrait",
|
"orientation" : "portrait",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default@2x.png",
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"orientation" : "portrait",
|
"extent" : "full-screen",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"subtype" : "retina4",
|
"subtype" : "retina4",
|
||||||
"extent" : "full-screen",
|
"filename" : "Default-568h@2x.png",
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"orientation" : "portrait",
|
"orientation" : "portrait",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~nostatusbar.png",
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
@ -25,6 +55,7 @@
|
|||||||
{
|
{
|
||||||
"orientation" : "landscape",
|
"orientation" : "landscape",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~landscape~nostatusbar.png",
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
@ -32,6 +63,7 @@
|
|||||||
{
|
{
|
||||||
"orientation" : "portrait",
|
"orientation" : "portrait",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~nostatusbar@2x.png",
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
@ -39,9 +71,88 @@
|
|||||||
{
|
{
|
||||||
"orientation" : "landscape",
|
"orientation" : "landscape",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~landscape~nostatusbar@2x.png",
|
||||||
"extent" : "full-screen",
|
"extent" : "full-screen",
|
||||||
"minimum-system-version" : "7.0",
|
"minimum-system-version" : "7.0",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default-568h@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"subtype" : "retina4",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad.png",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~nostatusbar.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~landscape.png",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~landscape~nostatusbar.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad@2x.png",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~nostatusbar@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~landscape@2x.png",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default~ipad~landscape~nostatusbar@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
|||||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 58 KiB |
@ -30,6 +30,8 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>armv7</string>
|
<string>armv7</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>UIRequiresFullScreen</key>
|
||||||
|
<true/>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
|||||||
@ -73,6 +73,13 @@ typedef NS_ENUM(NSUInteger, UIDeviceModelInches) {
|
|||||||
UIDeviceModelInches79,
|
UIDeviceModelInches79,
|
||||||
UIDeviceModelInches97,
|
UIDeviceModelInches97,
|
||||||
UIDeviceModelInches129,
|
UIDeviceModelInches129,
|
||||||
|
UIDeviceSimulatorModelInches35 = UIDeviceModelInches35,
|
||||||
|
UIDeviceSimulatorModelInches4 = UIDeviceModelInches4,
|
||||||
|
UIDeviceSimulatorModelInches47 = UIDeviceModelInches47,
|
||||||
|
UIDeviceSimulatorModelInches55 = UIDeviceModelInches55,
|
||||||
|
UIDeviceSimulatorModelInches79 = UIDeviceModelInches79,
|
||||||
|
UIDeviceSimulatorModelInches97 = UIDeviceModelInches97,
|
||||||
|
UIDeviceSimulatorModelInches129 = UIDeviceModelInches129,
|
||||||
UIDeviceModelInchesUnKnown
|
UIDeviceModelInchesUnKnown
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -331,43 +331,63 @@
|
|||||||
case UIDeviceGenerationModeliPad4:
|
case UIDeviceGenerationModeliPad4:
|
||||||
case UIDeviceGenerationModeliPadAir:
|
case UIDeviceGenerationModeliPadAir:
|
||||||
case UIDeviceGenerationModeliPadAir2:{
|
case UIDeviceGenerationModeliPadAir2:{
|
||||||
|
|
||||||
return UIDeviceModelInches97;
|
return UIDeviceModelInches97;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPadMini1:
|
case UIDeviceGenerationModeliPadMini1:
|
||||||
case UIDeviceGenerationModeliPadMini2:
|
case UIDeviceGenerationModeliPadMini2:
|
||||||
case UIDeviceGenerationModeliPadMini3:
|
case UIDeviceGenerationModeliPadMini3:
|
||||||
case UIDeviceGenerationModeliPadMini4:
|
case UIDeviceGenerationModeliPadMini4:{
|
||||||
{
|
|
||||||
return UIDeviceModelInches79;
|
return UIDeviceModelInches79;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPadPro:{
|
case UIDeviceGenerationModeliPadPro:{
|
||||||
return UIDeviceModelInches129;
|
return UIDeviceModelInches129;
|
||||||
}
|
|
||||||
case UIDeviceGenerationModeliPadSimulator:{
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
case UIDeviceGenerationModeliPadSimulator:
|
||||||
case UIDeviceGenerationModeliPhoneSimulator:{
|
case UIDeviceGenerationModeliPhoneSimulator:{
|
||||||
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
||||||
NSInteger screenWidth = (NSInteger)screenRect.size.width;
|
NSInteger screenHeight = ((NSInteger)screenRect.size.height > (NSInteger)screenRect.size.width) ? (NSInteger)screenRect.size.height : (NSInteger)screenRect.size.width;
|
||||||
NSInteger screenHeight = (NSInteger)screenRect.size.height;
|
|
||||||
|
|
||||||
switch (screenHeight) {
|
switch (screenHeight) {
|
||||||
case 480:
|
case 480:{
|
||||||
|
return UIDeviceSimulatorModelInches35;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case <#expression#>:
|
case 568:{
|
||||||
default:
|
return UIDeviceSimulatorModelInches4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 667:{
|
||||||
|
return UIDeviceSimulatorModelInches47;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 736:{
|
||||||
|
return UIDeviceSimulatorModelInches55;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1024:{
|
||||||
|
return UIDeviceModelInches97;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1366:{
|
||||||
|
return UIDeviceSimulatorModelInches129;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:{
|
||||||
|
return UIDeviceModelInchesUnKnown;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
|
default: {
|
||||||
|
return UIDeviceModelInchesUnKnown;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return UIDeviceModelInchesUnKnown;
|
return UIDeviceModelInchesUnKnown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||