Xcode Projects with Images.xcassets

1

In iOS projects created by Xcode, you have a "folder" called Images.xcassets , that is, an Xcode assets catalog.

  • In this catalog, I add an image to a UIButton for example, and this image I'm forced to keep it within the project? Or just Images.xcassets?

  • Inside the Images.xcassets, when I add an image for example, it shows me the overview , which has three spaces, which are respectively 1x, 2x and 3x. Am I required to set all three for the image to appear on an iPhone retina? Or if I just set it to 1x it will appear on all other devices?

asked by anonymous 07.08.2015 / 14:00

1 answer

0

The "xcassets" file is actually already a directory, if you click on an xcassets item with the right button and click "Open in finder" you will see the path where the image is. You do not need to put another reference to it in the project.

If you do not have 2x and 3x images, the image shown will be 1x resized to 2x or 3x size.

    
14.08.2015 / 19:45