Xcode Storyboard: how do I add a custom ImageView? macOS

Viewed 512

I have an ImageView, and don't know how to add my own Image to it.

I can't find anything for where to store the image and what code to use

Please note >> I am building a macOS application.

Also, where do I put the code?

1 Answers

I might not be understanding the problem fully, but if you want to add an own image to an ImageView, you have to:

  1. Store the image in your Assets.xcassets folder
  2. Click on your Image View, choose the drop-down menu in the Attributes Inspector and choose your image, or just type in the name of the image -> image for "image.jpg"

That would be it for showing images which are in your Assets folder. I hope that was the problem you were asking for.

Related