How do you move an image from the asset folder to the storyboard?

I was able to move an image to the asset folder - however I cannot figure out how to move it to the story board. I searched online for a few hours and there is nothing relating to how to actually get the image onto the story board expcept for one Git repository suggesting the use of an image file that does not exist on my screen. I can't believe how difficult Xcode makes it to perform basic tasks like this.

Let's assume a new project via Xcode 10.1's iOS 'Single View' template. Speak up if you're working on another platform.


Let's also ignore an asset folder/catalog for the time being.


You can add an image to a project by using the File menu, or by dragging it from a Finder window into the Navigator. A dialog will ask which action you wish to take. One will move that image into the working project folder and one wiil make a link to the original. Until you're comfortable with the tools, backups, cloning and housekeeping of your projects, I don't recommend links to files kept outside the project hierarchy. Don't get creative with those hierarchys as well.


• Note that when viewing assets on the left in the Navigator, there are folders with two colors. Yellow is a visual organizational clue strictly for the dev's convenience. Blue is actually a folder you can view in the Finder. Be sure not to confuse the two.


• Note that adding various resources is not always the same process, but for this discussion we'll just work with images.


• Also note that while you can rename images via the Navigator, this type of meta data juggling risks confusing Xcode as it relies on indexed data to help speed builds. My suggestion is to name images before adding and leave them alone thereafter. If you have to rename, remove the file/image, rename in the Finder and add it back. If you make another file with the same name, delete the original from the project first...don't just replace the old one with the new one...Xcode luvs to hang onto old assets. About names, keep in mind that macOS is not case-sensitive while iOS is. Be sure to use the exact file name in the Finder when coding. myFile.png is not the same as myfile.png.


At this point, you have a new project/app and your image on the left in the Navigator, at the top level of the project folder.


Select your storyboard and add a view, then either drag the image from the Navigator to the view, or add it via the media assets menu on the right. See Xcode Help for details.


Do this for practice so you get used to Xcode's UI, etc. Build to a device to check your work. Again. about file names being case-sensitive...the simulator won't care, but a device will, so don't assume just because an image works in the sim that it is ok.


>I can't believe how difficult Xcode makes it to perform basic tasks like this.


....little about this is 'basic'. More like steep learning curve.


As for your question, did you mean 'move', or copy, or? Was that storyboard empty or did you add a view first? Is this all something you know and none of this helps? Is there a reason you want to move an image from an asset folder/catalog, or is it just something you're doing as an exercise? Are you trying to follow a tutorial/youtube video? If so, keep in mind that 99% of those resources are out of date for the latest Xcode, which at this moment is v10.1.

I am not sure what you mean by "asset folder". If you mean "Appicon" then you don't do that. Those are for the icons. If you mean you have placed an image under the files in one of the folders on the left (the Navigator), then all you need to do is select that image in the "image" drop down list over on the right (the Inspector) for the UIImageView that is selected in the Storyboard.

How do you move an image from the asset folder to the storyboard?
 
 
Q