Adding an Image

Next we're going to add an image to our project and add a new view to our application that will display an image.

  1. Go back to Xcode. Select the Assets.xcassets items in the Project Navigator. This is where our project's images are stored and we're going to drag an image into this item from the Finder.

  2. Select the Main.storyboard in the Project Navigator.

  3. We will first delete our old View. Like before in the document outline, highlight the View and press the delete key.

  4. We don't want our image to be squashed or out of proportion, so change the Content Mode to Aspect Fit.

Last updated