UITextView added from code missing in UIStackView
问题 I'm trying to add a UITextView to UIStackView programatically, but it doesn't appear on the screen. When I check in Debug View Hierarchy, it is in the view hierarchy and it has some constraints but doesn't show up in the outputted view. This is my code: let stackView = UIStackView() let textView = UITextView() let button = UIButton() stackView.axis = .Horizontal stackView.spacing = 20 stackView.distribution = UIStackViewDistribution.Fill button.setImage(UIImage(named:"image1"), forState: