简体   繁体   中英

Custom view with intrinsic content size in uistackview

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

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

故事板显示UIStackView现在缺少height属性。

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM