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

Constraints are crashing when opening the gallery #71

Open
valentinaIancu-Hitta opened this issue Nov 1, 2019 · 0 comments
Open

Constraints are crashing when opening the gallery #71

valentinaIancu-Hitta opened this issue Nov 1, 2019 · 0 comments

Comments

@valentinaIancu-Hitta
Copy link

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2019-11-01 17:57:00.858871+0200 Bokadirekt Dev[10919:4818945] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x2834efa20 h=--& v=--& _UIToolbarContentView:0x10ed19620.width == 0 (active)>",
"<NSLayoutConstraint:0x2834e8960 H:|-(0)-[_UIButtonBarStackView:0x10ed0d480] (active, names: '|':_UIToolbarContentView:0x10ed19620 )>",
"<NSLayoutConstraint:0x2834ebf70 _UIButtonBarStackView:0x10ed0d480.trailing == _UIToolbarContentView:0x10ed19620.trailing (active)>",
"<NSLayoutConstraint:0x2834ef8e0 'IB_Leading_Leading' H:|-(16)-[_UIModernBarButton:0x11217bd60] (active, names: '|':_UIButtonBarButton:0x115572580 )>",
"<NSLayoutConstraint:0x2834ed090 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x11217bd60]-(16)-| (active, names: '|':_UIButtonBarButton:0x115572580 )>",
"<NSLayoutConstraint:0x2834ef020 'UISV-canvas-connection' UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x115572580.leading (active)>",
"<NSLayoutConstraint:0x2834ecb40 'UISV-canvas-connection' UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide'.trailing == UIView:0x115524200.trailing (active)>",
"<NSLayoutConstraint:0x2834ecc30 'UISV-spacing' H:[_UIButtonBarButton:0x115572580]-(0)-[UIView:0x115524200] (active)>",
"<NSLayoutConstraint:0x2834ea620 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x10ed0d480 )>",
"<NSLayoutConstraint:0x2834e85a0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x282e40c40'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x10ed0d480 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2834ed090 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x11217bd60]-(16)-| (active, names: '|':_UIButtonBarButton:0x115572580 )>

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

1 participant