How can I change constraints priority in run time

后端 未结 8 1246
一整个雨季
一整个雨季 2020-12-12 16:07

I have a view which has dynamic height and I am trying to change this view height priority in run time.

Here is my part of code;

if (index == 0) {

          


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 16:32

    Now you can , just take the IBOutlet connection for your constraints , then use this code .

    self.webviewHeight.priority = UILayoutPriority(rawValue: 1000)
    

提交回复
热议问题