I thought that I would set ImageView to Storyborad when using an image as the background, but I found that it can be done in the same way as setting backgroundcolor, so I summarized it briefly as a memorandum.
・ Create a new project in Xcodo ・ Prepare an image to be used as a background
viewDidLoad
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "backgoroundImage.jpg ")!)
How to set background image in Xcode using swift?
I was able to easily set the image in the background. This article has become more of a memorial element, but I hope it will be of some help to anyone looking for a way to set an image in the background.
Recommended Posts