Most of the times i draw my views like this :
let someView = UIView() view.addSubview(someView) someView.translatesAutoresizingMaskIntoConstraints = f