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

The view hierarchy is not prepared for the constraint #893

Closed
tachang opened this issue Mar 28, 2016 · 1 comment
Closed

The view hierarchy is not prepared for the constraint #893

tachang opened this issue Mar 28, 2016 · 1 comment

Comments

@tachang
Copy link

tachang commented Mar 28, 2016

I seem to get this every so often when working with the view in the Storyboard:

The view hierarchy is not prepared for the constraint: <NSLayoutConstraint:0x7ff1fb61cbb0 V:[Charts.BarChartView:0x7ff1fb939500(0)]>

When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView(UIConstraintBasedLayout) _viewHierarchyUnpreparedForConstraint:] to debug.

I sometimes try to do some auto layout stuff but even then I am not exactly sure what is happening. I am able to see the chart fine though. Anyone have any idea what causes this or what is going on?

@liuxuan30
Copy link
Member

I guess you asked in a wrong place.. SO can much better help you.
Your constraints has troubles, the error message tells you.

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