swift3

Autolayouts : How to create collapse/Expand dynamic view swift 3/4

隐身守侯 提交于 2020-08-20 19:07:17
问题 I have a problem that I can't create a view that can collapse it's contents that may be dynamic height , i know it's easy to collapse it with height constant = 0 , but i can't figure out how to make it expand again as the content of that view is dynamic and sub-itmes may be added later I want that behavior 回答1: Your answer has massively overcomplicated a very simple solution. You should first create your zeroHeightConstraint as a property. let zeroHeightConstraint: NSLayoutConstraint =