Adding Image to xCode by dragging it from File

100,880

Solution 1

You can't add image from desktop to UIimageView, you only can add image (dragging) into project folders and then select the name image into UIimageView properties (inspector).

Tutorial on how to do that: http://conecode.com/news/2011/06/ios-tutorial-creating-an-image-view-uiimageview/

Solution 2

Add the image to Your project by clicking File -> "Add Files to ...".

Then choose the image in ImageView properties (Utilities -> Attributes Inspector).

Share:
100,880
Development
Author by

Development

Updated on July 05, 2022

Comments

  • Development
    Development almost 2 years

    I'm having trouble adding an image in xCode 4.2. When I'm inserting an UIimageview into the ViewController by dragging it from my desktop, it won't work.

    Is there any other possible ways to add an image?

  • JBallin
    JBallin over 5 years
    link is broken.