ios - Constraints aren't being added through updateViewConstraints -


i making custom keyboard , have function named setbuttonconstraints(). when insert function viewdidload() , run app constraints set. when move function call override func updateviewconstraints() (which supposed called after subviews have been layed out) no constraints set. cause of this?

this simple updateviewconstraints() looks like:

 override func updateviewconstraints() {     super.updateviewconstraints()      // add custom view sizing constraints here     setbuttonconstraints()  } 

per apple's documentation, updateviewconstraints() gets called if constraints need updated. also, believe need call super.updateviewconstraints() after change constraints.

the following link helpful.

where should setting autolayout constraints when creating views programmatically


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -