2

I am really new to Xcode and Swift so I think there is an easy fix but couldn't find it. Here are the screenshots.

In this screenshot there should be the diamond images which you can see in the second screenshot inside the red circle to use for UIImageView:

screenshot with diamond images which you can see in the second screenshot inside the red circle to use for UIImageView

And this is the screenshot of the diamond images in different sizes to use for UIImageView:

screenshot of the diamond images in different sizes to use for UIImageView.

I am watching a Udemy course and in the course when you add some images in the app icon folder you can see them in the red circle on Main.storyboard.

shim
  • 9,289
  • 12
  • 69
  • 108
Anon J
  • 23
  • 4

1 Answers1

0

The app icon is used to show images on the iPhone/IPad home screen. To use an image inside app development, in the Assets.xcassets folder you need to click on the + button and select Image Set, and name whatever you want to name it. Then drag and drop the correct size image in @2x and @3x sections. See the below screenshot.

enter image description here

Now you can use this image in your project. You can see in the below screenshot that the image name SampleImage is available in the image dropdown.

enter image description here

Darshan
  • 431
  • 4
  • 12
  • Thanks, it worked. Now I need to get rid of the white spaces in the diamond.png. Can I do that on xcode or do I need another tool? – Anon J Aug 05 '21 at 21:16
  • 1
    You need transparent image. What i mean is image should only consist of the diamond it shouldn’t have any background. You can ask your design team to provide you the image with no background. If you are well verse with adobe application which is used for editing images then you can do it by urself if you know how to do it. – Darshan Aug 06 '21 at 04:15