I'm trying to set the height of a view according to my View Controller's height. This is my code.
self.view.heightAnchor.constraint(equalTo: someView.heightAnchor, multiplier: 20.0, constant: 0.0)
You are reading the parameter incorrectly. 20 means you want view's height to be 20 times bigger than someView's height. What you want is view to be 20% of someView's hieght, so you need to multiply by .2.
self.view.heightAnchor.constraint(equalTo: someView.heightAnchor, multiplier: 0.2, constant: 0.0)