I want to make the object box 80 percent height of the view controller and the width should be a 100 percent. The object box should be pinned to the top with the 20 percent of space being pinned to the bottom.
import UIKit
class ViewController: UIViewController {
var box = UIImageView()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
box.backgroundColor = .blue
box.frame = self.view.frame
self.view.addSubview(box)
}
}