Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize autoRemove #167

Open
Dengni8023 opened this issue Feb 13, 2017 · 1 comment
Open

Modernize autoRemove #167

Dengni8023 opened this issue Feb 13, 2017 · 1 comment

Comments

@Dengni8023
Copy link

Why put a NSAssert at end of method "autoRemove" ? On iOS7, when I call autoRemove to remove a NSLayoutConstraint what not installed, the app will crash at line "NSAssert(nil, @"Failed to remove constraint: %@", self);". Can the NSAssert be removed?

@mickeyreiss
Copy link
Contributor

It's possible that this assertion pre-dates iOS 7 and NSLayoutConstraint.isActive. I think the autoRemove functionality could be improved:

  • Clean up the assertion as @Dengni8023 described
  • Utilize .active = NO in constraint removal

@mickeyreiss mickeyreiss changed the title "autoRemove" crash on iOS7 with NSAssert Modernize autoRemove Apr 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants