How can I display views using autolayout constraints in Xcode playground?
问题 I am trying to display views configured with autolayout constraints in XCode playground , but it doesn't seem to work. It's like playground ignores the constraints completely, and I can't find information about this issue anywhere. Here's the code I tried: let view = UIView() view.frame = CGRectMake(0, 0, 400, 200) view.backgroundColor = UIColor.lightGrayColor() let label = UILabel() // I can only see the label if I set a frame // UILabel(frame: CGRectMake(0, 0, 200, 50)) label