iOS Override Auto Layout for certain components/objects in a view -


i have view series of buttons underneath each other, when 1 of buttons gets selected need programatically add onother button @ top of other buttons , change height of buttons no space lost bottom of screen.

the problem need auto layout turned on view, because of can't resize, or change position of buttons.

my question how can 'overide' autolayout of objects in view (buttons) change layout when button selected.

thanks

autolayout capable of use case you're describing. height of views can compress make room 1 more button.

use - (void)setcontentcompressionresistancepriority:(uilayoutpriority)priority foraxis:(uilayoutconstraintaxis)axis on each of buttons , set priority low number (i.e. <250). since have vertical row, axis uilayoutconstraintaxisvertical.

you have call -setneedsupdateconstraints on superview of buttons in order new constraints show up.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -