TZStackView
TZStackView copied to clipboard
Fixed divide by 0 «NaN» crash
If the distribution is set to FillProportionally and all arranged subviews have their total size equal 0 (typical example is there's a single arrangedSubview which intrinsicContentSize is CGSizeZero), we have a crash later when creating the constraints
let multiplier = arrangedSubview.intrinsicContentSize().width / totalSize constraints.append(constraint(item: arrangedSubview, attribute: .Width, toItem: self, multiplier: multiplier, priority: priority))
multiplier is NaN and we have a crash creating the constraint.