Xcode storyboard versus @3x

165 views Asked by At

Using storyboard on Xcode 6. I have 3 images

[email protected], [email protected], bkg_menu_iphone.png

Xcode automatically detect the regular and @2x(merge it together in the Media view, etc), but the @3x stay alone.

  1. Any idea why Xcode still not manage the @3x?

  2. My first idea was to have ONLY the @3x and have xcode auto adjust size based on the device. But it doesnt work well using the storyboard. (If I drag it to the viewcontroller, it was not auto resize as a @2x or other.) (and if I use the @2x, it was)

  3. How do you manage the 3 iPhone size versus storyboard?

Hope my english was ok. Thanks for comment & best practice.

Xcode 6

1

There are 1 answers

0
dstudeba On BEST ANSWER

I am using Xcode 6.3.1. You should use Images.xcassets found in the File Manager.

enter image description here

You then drag and drop the images from the File Manger into the left hand pane of the Images.xcassets. It will create a new xcasset with the same name minus the @#x.png.

enter image description here

You then drag the other resolution files and drop the into the corresponding image placeholders.

enter image description here

You can then use the name of the .xcasset in the storyboard as shown below.

enter image description here

(pick the first entry without the .png extension)