when i uncheck the active button in NSLayoutConstraint the constraint will never seen again!?

chris's Avatar


19 Jul, 2017 08:07 AM

question 1:
where can i find the constraint again? is this a bug or not?

question 2:
can i add a new constrain to a select view? i did't find a action can do this。


  1. 1 Posted by chris on 19 Jul, 2017 08:08 AM

    chris's Avatar

    upload image

  2. Support Staff 2 Posted by Tony Arnold on 24 Jul, 2017 12:12 AM

    Tony Arnold's Avatar

    Hi Chris,

    From Apple's documentation on NSLayoutConstraint:

    Activating or deactivating the constraint calls addConstraint(_:) and removeConstraint(_:) on the view that is the closest common ancestor of the items managed by this constraint.

    My guess is that we're losing the reference to the layout constraint because it is no longer part of the view hierarchy. I'll file a bug internally to look into this. Thanks for letting me know!



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac