Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-26479] : TiUtils.m missing check for iPhone XR and iPhone XS Max images #10392

Merged
merged 2 commits into from
Oct 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 14 additions & 2 deletions iphone/Classes/TiUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,13 @@ + (NSURL *)checkFor2XImage:(NSURL *)url
NSString *os = [TiUtils isIPad] ? @"~ipad" : @"~iphone";

if ([TiUtils is3xRetina]) {
if ([TiUtils isSuperRetina5_8Inch]) {
if ([TiUtils isSuperRetina6_5Inch]) {
// -2688@3x iPhone XS Max specific
NSString *testpath = [NSString stringWithFormat:@"%@-2688h@3x.%@", partial, ext];
if ([fm fileExistsAtPath:testpath]) {
return [NSURL fileURLWithPath:testpath];
}
} else if ([TiUtils isSuperRetina5_8Inch]) {
// -2436h@3x iPhone X specific
NSString *testpath = [NSString stringWithFormat:@"%@-2436h@3x.%@", partial, ext];
if ([fm fileExistsAtPath:testpath]) {
Expand All @@ -830,7 +836,13 @@ + (NSURL *)checkFor2XImage:(NSURL *)url
}
}
if ([TiUtils is2xRetina]) {
if ([TiUtils isRetina4_7Inch]) {
if ([TiUtils isRetina6_1Inch]) {
// -1792h@2x iPhone XR specific
NSString *testpath = [NSString stringWithFormat:@"%@-1792h@2x.%@", partial, ext];
if ([fm fileExistsAtPath:testpath]) {
return [NSURL fileURLWithPath:testpath];
}
} else if ([TiUtils isRetina4_7Inch]) {
// -667h@2x iPhone 6/7 specific
NSString *testpath = [NSString stringWithFormat:@"%@-667h@2x.%@", partial, ext];
if ([fm fileExistsAtPath:testpath]) {
Expand Down