0

I created a framework using the tutorial over at raywenderlich.com and also included a resource bundle with it. Inside of the bundle is a storyboard file and many images, all having a corresponding @2x file.

When I include this framework and bundle in my testing app, the storyboard loads fine when it's presented, but the retina graphics are not displayed. When I click the drop-down arrow on the bundle in the testing app, all the @2x files are there.

How do I get it so that the @2x graphics load? I heard the phone should detect them by itself, but they're not loading.

Thanks.

Alec
  • 919
  • 2
  • 10
  • 25

1 Answers1

0

Xcode automatically combines the retina and non-retina .png files into a "one multi-page TIFF"

Solution:

use @"tiff" instead of @"png"

UIImage *image = [UIImage imageWithContentsOfFile:[yourBundle pathForResource:@"yourImage" ofType:@"tiff"]];

here is the reference

Community
  • 1
  • 1
Aiden Luo
  • 31
  • 3