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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is it not allowed to update required priority? #755

Open
3 tasks done
i-tengfei opened this issue Jun 2, 2022 · 1 comment
Open
3 tasks done

Why is it not allowed to update required priority? #755

i-tengfei opened this issue Jun 2, 2022 · 1 comment

Comments

@i-tengfei
Copy link

New Issue Checklist

馃毇 If this template is not filled out your issue will be closed with no comment. 馃毇

  • I have looked at the Documentation
  • I have read the F.A.Q.
  • I have filled out this issue template.

Issue Info

Info Value
Platform e.g. ios
Platform Version e.g. 15.0
SnapKit Version e.g. 5.6

Issue Description

I try to update a required priority, but it fails, then I see code like this, why is it not allowed to update required priority?

if (layoutConstraint.priority.rawValue < requiredPriority), (self.priority.constraintPriorityTargetValue != requiredPriority) {

@erik-agens
Copy link

We are also seeing this issue.
Pre iOS 13, updating layout priority from required to a lower value would give a crash.
Read more here: https://stackoverflow.com/a/31186261
However, from iOS 13 and up it is now possible to update the priority and it would be great if SnapKit would allow this as well.

@ghost ghost mentioned this issue May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants