Merge pull request #3 from giuseppenucifora/develop

- Release 0.1.4
This commit is contained in:
Giuseppe Nucifora 2016-01-19 17:45:40 +01:00
commit 52afa7a1cf
23 changed files with 228 additions and 36 deletions

View File

@ -467,7 +467,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@ -500,7 +500,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;

View File

@ -5,16 +5,31 @@
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
@ -44,10 +59,15 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -1,23 +1,53 @@
{
"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",
"idiom" : "iphone",
"filename" : "Default@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"filename" : "Default-568h@2x.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default~ipad~nostatusbar.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
@ -25,6 +55,7 @@
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default~ipad~landscape~nostatusbar.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
@ -32,6 +63,7 @@
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default~ipad~nostatusbar@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
@ -39,13 +71,92 @@
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default~ipad~landscape~nostatusbar@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"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" : {
"version" : 1,
"author" : "xcode"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -30,6 +30,8 @@
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>

View File

@ -73,6 +73,13 @@ typedef NS_ENUM(NSUInteger, UIDeviceModelInches) {
UIDeviceModelInches79,
UIDeviceModelInches97,
UIDeviceModelInches129,
UIDeviceSimulatorModelInches35 = UIDeviceModelInches35,
UIDeviceSimulatorModelInches4 = UIDeviceModelInches4,
UIDeviceSimulatorModelInches47 = UIDeviceModelInches47,
UIDeviceSimulatorModelInches55 = UIDeviceModelInches55,
UIDeviceSimulatorModelInches79 = UIDeviceModelInches79,
UIDeviceSimulatorModelInches97 = UIDeviceModelInches97,
UIDeviceSimulatorModelInches129 = UIDeviceModelInches129,
UIDeviceModelInchesUnKnown
};

View File

@ -171,6 +171,8 @@
if ([modelIdentifier isEqualToString:@"iPad4,2"]) return UIDeviceGenerationModeliPadAir;
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return UIDeviceGenerationModeliPadAir2;
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return UIDeviceGenerationModeliPadAir2;
if ([modelIdentifier isEqualToString:@"iPad6,7"]) return UIDeviceGenerationModeliPadPro;
if ([modelIdentifier isEqualToString:@"iPad6,8"]) return UIDeviceGenerationModeliPadPro;
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
@ -203,8 +205,14 @@
if ([modelIdentifier hasSuffix:@"86"] || [modelIdentifier isEqual:@"x86_64"])
{
BOOL smallerScreen = ([[UIScreen mainScreen] bounds].size.width < 768.0);
return (smallerScreen ? UIDeviceGenerationModeliPhoneSimulator : UIDeviceGenerationModeliPadSimulator);
BOOL iPhoneScreen = ([[UIScreen mainScreen] bounds].size.width < 768.0);
BOOL iPadScreen = !iPhoneScreen;
if (iPadScreen) {
return UIDeviceGenerationModeliPadSimulator;
}
else {
return UIDeviceGenerationModeliPhoneSimulator;
}
}
return UIDeviceGenerationModelUnknown;
}
@ -250,6 +258,9 @@
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return @"iPad Air 2 (Wi-Fi)";
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return @"iPad Air 2 (Cellular)";
if ([modelIdentifier isEqualToString:@"iPad6,7"]) return @"iPad Pro (Wi-Fi)";
if ([modelIdentifier isEqualToString:@"iPad6,8"]) return @"iPad Pro (Cellular)";
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
if ([modelIdentifier isEqualToString:@"iPad2,5"]) return @"iPad mini 1G (Wi-Fi)";
@ -320,23 +331,62 @@
case UIDeviceGenerationModeliPad4:
case UIDeviceGenerationModeliPadAir:
case UIDeviceGenerationModeliPadAir2:{
return UIDeviceModelInches97;
}
break;
case UIDeviceGenerationModeliPadMini1:
case UIDeviceGenerationModeliPadMini2:
case UIDeviceGenerationModeliPadMini3:
case UIDeviceGenerationModeliPadMini4:
{
case UIDeviceGenerationModeliPadMini4:{
return UIDeviceModelInches79;
}
break;
case UIDeviceGenerationModeliPadPro:{
return UIDeviceModelInches129;
}
default:
break;
}
case UIDeviceGenerationModeliPadSimulator:
case UIDeviceGenerationModeliPhoneSimulator:{
CGRect screenRect = [[UIScreen mainScreen] bounds];
NSInteger screenHeight = ((NSInteger)screenRect.size.height > (NSInteger)screenRect.size.width) ? (NSInteger)screenRect.size.height : (NSInteger)screenRect.size.width;
switch (screenHeight) {
case 480:{
return UIDeviceSimulatorModelInches35;
}
break;
case 568:{
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;
}
default: {
return UIDeviceModelInchesUnKnown;
break;
}
}
return UIDeviceModelInchesUnKnown;
}

View File

@ -17,10 +17,6 @@ UIDevice-Utils is available through [CocoaPods](http://cocoapods.org). To instal
it, simply add the following line to your Podfile:
```ruby
pod "UIDevice-Utils" , :git => 'https://github.com/giuseppenucifora/UIDevice-Utils.git'
or
pod "UIDevice-Utils"
```

View File

@ -7,26 +7,26 @@
#
Pod::Spec.new do |s|
s.name = "UIDevice-Utils"
s.version = "0.1.2"
s.summary = "Category on UIDevice to distinguish between platforms."
s.description = "Category to easy distinguish devices, family platform device, or device inches. Provide human-readable device names e.g. 'iPhone 6S Plus' or enums e.g. 'UIDeviceGenerationModeliPhone6SPlus'"
s.homepage = "https://github.com/giuseppenucifora/UIDevice-Utils"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "Giuseppe Nucifora" => "me@giuseppenucifora.com" }
s.source = { :git => "https://github.com/giuseppenucifora/UIDevice-Utils.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.name = "UIDevice-Utils"
s.version = "0.1.4"
s.summary = "Category on UIDevice to distinguish between platforms."
s.description = "Category to easy distinguish devices, family platform device, or device inches. Provide human-readable device names e.g. 'iPhone 6S Plus' or enums e.g. 'UIDeviceGenerationModeliPhone6SPlus'"
s.homepage = "https://github.com/giuseppenucifora/UIDevice-Utils"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "Giuseppe Nucifora" => "me@giuseppenucifora.com" }
s.source = { :git => "https://github.com/giuseppenucifora/UIDevice-Utils.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.platform = :ios, '7.0'
s.requires_arc = true
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
'UIDevice-Utils' => ['Pod/Assets/*.png']
}
s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
'UIDevice-Utils' => ['Pod/Assets/*.png']
}
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end