CB-7633 - Add support for iPhone 6/6+
This commit is contained in:
parent
0ffe1c2d46
commit
55722de1c4
@ -148,6 +148,7 @@
|
|||||||
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
|
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
|
||||||
BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape);
|
BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape);
|
||||||
BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown);
|
BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown);
|
||||||
|
// this means there are no mixed orientations in there
|
||||||
BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
|
BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
|
||||||
|
|
||||||
if (imageName) {
|
if (imageName) {
|
||||||
@ -156,9 +157,24 @@
|
|||||||
imageName = @"Default";
|
imageName = @"Default";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device.iPhone5) {
|
if (device.iPhone5) { // does not support landscape
|
||||||
imageName = [imageName stringByAppendingString:@"-568h"];
|
imageName = [imageName stringByAppendingString:@"-568h"];
|
||||||
} else if (device.iPad) {
|
} else if (device.iPhone6) { // does not support landscape
|
||||||
|
imageName = [imageName stringByAppendingString:@"-667h"];
|
||||||
|
} else if (device.iPhone6Plus) { // supports landscape
|
||||||
|
switch (currentOrientation) {
|
||||||
|
case UIInterfaceOrientationLandscapeLeft:
|
||||||
|
case UIInterfaceOrientationLandscapeRight:
|
||||||
|
if (supportsLandscape) {
|
||||||
|
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
imageName = [imageName stringByAppendingString:@"-736h"];
|
||||||
|
|
||||||
|
} else if (device.iPad) { // supports landscape
|
||||||
if (isOrientationLocked) {
|
if (isOrientationLocked) {
|
||||||
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
|
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user