AutoLayout: removeFromSuperview / removeConstraints throws exception and crashes hard

后端 未结 13 2238
谎友^
谎友^ 2020-11-27 11:05

We use auto layout constraints selectively, primarily to position labels in relation to editable field elements (UITextView, UITextField, typically). However, since impleme

13条回答
  •  忘掉有多难
    2020-11-27 11:39

    For anyone encountering this issue in any iOS version > 8.0, the Apple docs state to use the "active" property on the NSLayoutConstraint rather than the removeConstraint/addConstraint functions on UIView. Apple Docs addConstraint reference

提交回复
热议问题