I am using UIStackView with the following configuration:
let contentView = UIStackView() contentView.distribution = .EqualSpacing contentView.alignment = .Center contentView.spacing = horizontalSpacing
Each element has its own intrinsicContentSize , so UIStackView should be possible for UIStackView to provide its own intrinsicContentSize . The documentation states that spacing used as the minimum interval.
Example:
view1: width=10 view2: width=15 spacing = 5 [view1(10)]-5-[view2(15)]
intrinsicContentSize.width stackView should be 30 .
Instead, I get:
▿ CGSize - width : -1.0 - height : -1.0 { ... }
which tells me that intrinsicContentSize cannot be provided.
Do any of you know that I am doing something wrong if this is behavior or if it is a mistake?
ios objective-c uikit swift uistackview
simonseyer
source share