Container view with dynamic height inside UIScrollView with auto layout

前端 未结 3 1479
灰色年华
灰色年华 2021-02-02 15:03

I have a UIScrollView, nested inside of which in one content view and it has two child views nested, a regular UIView with a known height, and a container view with dynamic heig

3条回答
  •  北海茫月
    2021-02-02 15:45

    You must provide enough constraints information in the UIScrollView so that it can calculate its contentSize. For you case, you must provide height constraint for you container view. You can IBOutlet the height constraint and update its value accordingly.

提交回复
热议问题