Why is it not allowed to update required priority?
i-tengfei opened this issue Β· comments
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?
SnapKit/Sources/Constraint.swift
Line 298 in 07c5d1f
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.