heightAnchor.constraint not change height of view
问题 I use this code: func show(){ view.translatesAutoresizingMaskIntoConstraints = false view.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 0).isActive = true view.topAnchor.constraint(equalTo: view.topAnchor, constant: 0).isActive = true view.heightAnchor.constraint(equalToConstant: view.frame.height - 300).isActive = true view.rightAnchor.constraint(equalTo: view.rightAnchor, constant: 0).isActive = true } func hide(){ view.translatesAutoresizingMaskIntoConstraints = false view