Opting out of auto layout for a single view?

前端 未结 3 1731
遇见更好的自我
遇见更好的自我 2021-02-19 06:37

I have a view that performs layout of its subviews in code. The layout is too complex for auto layout, and auto layout breaks the layout code. Is there any way to force auto l

3条回答
  •  清酒与你
    2021-02-19 06:59

    Found the answer in the WWDC videos. layoutSubviews does not work the same under auto layout as it did before. It does not stop auto layout from happening, but rather is an opportunity to add/change/remove constraints during layout.

    Last night I tried moving the custom view to a different NIB and that seems to be the only solution.

提交回复
热议问题