Suppose I have three labels that are below each other in a column. The top edge of the top label is attached to the top edge of the label. All the upper edges of the labels are attached to the lower edge of the previous label. The leading and trailing edges of all marks are attached to the leading and trailing edges of the label. Here's what it looks like in Interface Builder (I added a blue background to each label to visualize its size).

In the simulator, the result is as follows.

All tags are connected to the outputs in the view controller.
@IBOutlet weak var label1: UILabel!
@IBOutlet weak var label2: UILabel!
@IBOutlet weak var label3: UILabel!
When I set the text label2tonil
label2.text = nil
the label itself is crashing.

. , . label1 label3 .
- iOS8. , - , ? , , .

, :
/
.
@IBOutlet weak var spacingConstraint: NSLayoutConstraint!
(, awakeFromNib viewDidLoad).
private var initialSpacing: CGFloat!
override func viewDidLoad() {
initialSpacing = spacingConstraint.constant
...
, nil , nil.
spacingConstraint.constant = label2.text == nil ? 0 : initialSpacing
, .
. , , , nil , nil.
, . , ( ).
UIStackView
, UIStackView iOS 9 .