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
Unable to simultaneously satisfy constraints. #2
Comments
@murselturk It has nothing wrong with Align, it’s just usual autolayout conflict. Autolayout can’t resolve equations you’ve given. You’ve basically said something like “calculate my bgView’s height based on root view, and make my tableView’s height less than bgView’s”. But autolayout calculates sizes from deepest view in hierarchy to the most top and it has no idea, how exactly it should implement your requirement, because when it tries to calculate tableView, bgView is not calculated yet. You have to provide more information about positioning. Try to set tableView’s height constraint priority to lower value. Or even completely rethink your constraints. Like, And you need to read about constraint’s priority and view’s resistance and hugging priorities to avoid that kind of mistakes in future. |
@ivanpetrov16130 Thanks. I've tried also with the following code:
But same result. |
@ivanpetrov16130 Constraint priority solved my problem. Thanks again.
|
Hey,
When I run this code, I get the following output, and I'm not sure what I'm doing wrong:
Anybody have an idea how to fix that?
Thank you in advance.
The text was updated successfully, but these errors were encountered: