Justin Sinnard
Justin Sinnard

Reputation: 135

How to set and image to a button using a storyboard default image?

I'm building a custom checkbox in a class. But I want to use one of the images that are built into Xcode such as in storyboard. if you select the button and select one of the prebuilt images. What I have: enter image description here

This will call an image in the assets folder. But I want to use one of the prebuilt images in storyboard. such as: enter image description here

How do I go about calling them? is there a way?

Upvotes: 1

Views: 3492

Answers (1)

Anton Barkov
Anton Barkov

Reputation: 299

You init the image with its system name:

let checkImage = UIImage(systemName: "checkmark.seal")

Upvotes: 2

Related Questions