How to update the constant height constraint of a UIView programmatically?

后端 未结 9 2322
执笔经年
执笔经年 2020-11-27 11:16

I have a UIView and I set the constraints using Xcode Interface Builder.

Now I need to update that UIView instance\'s height constant progra

9条回答
  •  感动是毒
    2020-11-27 11:55

    If the above method does not work then make sure you update it in Dispatch.main.async{} block. You do not need to call layoutIfNeeded() method then.

提交回复
热议问题