I am new to ios development so please forgive me. I am taking it step by step and I was wondering how would I make a image I want to be the background in the view controller so I can add on top of it?
If you want to do it programmatically using swift here is the code:
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "yourImage.png"))
Or you can create a uiimage and place your image in it:
let yourImage = UIImage(named: "yourImage.png")
let imageview = UIImageView(image: yourImage)
self.view.addSubview(imageview)
Add a UIImageView to your view controller's view. Assign your background image to the image view. You can do all this in the storyboard file.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With