Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25504

-2436h@3x Images on iPhone X are not used when -736h@3x exists

    Details

      Description

      When using image-2436h@3x.jpg images are not picked up when running on iPhone X if
      an image-736h@3x.jpg exists.
      It works fine with splash screens but not on other images.

      The code below should be checking if running on iPhone X or iPhone 6/7 Plus and choose file accordingly.

      TiUtils.m

      	if ([TiUtils isRetinaHDDisplay]) {
      		// first try -736h@3x iPhone 6 Plus specific
      		NSString *testpath = [NSString stringWithFormat:@"%@-736h@3x.%@",partial,ext];
      		if ([fm fileExistsAtPath:testpath]) {
      			return [NSURL fileURLWithPath:testpath];
      		}
          
          		// second try -2436h@3x iPhone X specific
          		testpath = [NSString stringWithFormat:@"%@-2436h@3x.%@", partial, ext];
          		if ([fm fileExistsAtPath:testpath]) {
          			return [NSURL fileURLWithPath:testpath];
         		}
       
          		// third try plain @3x
      		testpath = [NSString stringWithFormat:@"%@@3x.%@",partial,ext];
      		if ([fm fileExistsAtPath:testpath]) {
      			return [NSURL fileURLWithPath:testpath];
      		}
      	}
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              thomas.neerup@eg.dk Thomas Neerup Andersen
              Reviewer:
              Vijay Singh
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5969
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code