XCode, Assets & Simulators – analysis with display & assets

Lets create 3 images named as follows.


Dimension of above mentioned images are as follows.

my_image.png = 100 pixels width x 100 pixels height
my_image@2x.png = 200 pixels width x 200 pixels height
my_image@3x.png = 300 pixels width x 300 pixels height

Assets analysis - my_image@3x  Assets analysis - my_image@2xAssets analysis - my_image

1. Now, create a dummy project in XCode. In my case, my dummy project name is ‘AssetsDemo’. Use ‘Single View Application’ as a project template.
2. Open project, from project navigator, click on file ‘Images.xcassets’ to open assets as indicated below.

Assets analysis - step 2
3. Click on ‘+’ button as indicated below.

Assets analysis - step 3
4. Choose option ‘New Image Set’

Assets analysis - step 4
5. Hit enter on newly added imageset to rename which might have name ‘image’.
6. Rename it with ‘my_image’.

Assets analysis - step 5
7. Add files ‘my_image.png’, ‘my_image@2x.png’, ‘my_image@3x.png’ in respective box by drag & drop from finder to imageset of xcode.

Assets analysis - step 7
8. Now open storyboard file from your project.
9. Zoom in to your view controller’s view.
10. Drag & drop Image from Media section to your view of view-controller.

Run on several iOS simulators.

Results from each simulators are as follows.

Assets analysis - iPhone 6 Plus Simulator Screenshot Assets analysis - iPhone 5-5S-5C Simulator Screenshot Assets analysis - iPhone 4-4S Simulator ScreenshotAssets analysis - iPhone 6 Simulator Screenshot Assets analysis - iPad Air Simulator Screen Shot Assets analysis - iPad 2 Simulator Screen Shot

Leave a Reply

Your email address will not be published. Required fields are marked *