Custom view with intrinsic content size in uistackview

Viewed 1493

A custom view with overridden intrinsicContentSize property is added to a UIStackView

 override var intrinsicContentSize: CGSize {
    return CGSize(width: 100, height: 44)
  }

Storyboard shows that the UIStackView is now missing a height property.

Although the custom view is drawn successfully in the simulator, I still want to get rid of this storyboard error message. Thank you

1 Answers

It looks like you are missing the constraint of the stack view not the view added to the stack. Check the constraints of the stack.

Related