Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to successfully add an image in Storyboard in Xcode 6 in Swift?

I'm very new to Xcode (2 days) and so far I'm finding it fairly frustrating. I'm just trying to add an image to my app's ViewController via he Storyboard, but it does not appear on the simulator. Could someone assist me?

like image 607
TMM Avatar asked Mar 18 '15 03:03

TMM


People also ask

How do I add an image to Xcode?

Drag and drop image onto Xcode's assets catalog. Or, click on a plus button at the very bottom of the Assets navigator view and then select “New Image Set”. After that, drag and drop an image into the newly create Image Set, placing it at appropriate 1x, 2x or 3x slot.

Where do I put images in Xcode project?

To use images in Xcode, you need to upload them to Assets. xcassets , located in the Supporting Files folder. There are two options you can go with: bitmaps (aka . png files) or vectors (aka .


1 Answers

Here are some details on xcode 10.

  1. Edit the story board, create an image view. Wayne stated, add the image you want in the Images.xcassets.

  2. Click on your image view:

enter image description here

  1. Do View -> Inspectors -> Show Attribute Inspector
  2. Select the image:

enter image description here

like image 65
Patrice Gagnon Avatar answered Sep 20 '22 14:09

Patrice Gagnon