I'm new to Swift, and I'm trying to make an image in a tabbed application fill the whole screen. This is what I've got so far.
let imageName = "bkgrd"
let image = UIImage(named: imageName)
let imageView = UIImageView(image: image!)
imageView.frame = CGRect( 0, 0, 100, 200)
However this doesn't seem to work, could anyone help?
You can add a imageView directly from interface builder, and set the autolayout constraints to superview to 0 and the image source, or you can add programmatically as below: