criticalmaps / criticalmaps-ios

Critical Maps iOS App 🚲✊
http://www.criticalmaps.net
MIT License
290 stars 41 forks source link

Ambiguous auto layout constraints for Settings #75

Closed lennet closed 5 years ago

lennet commented 5 years ago

Prettified Error)

[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. ( "<NSLayoutConstraint:0x600001778d20 CMAppLogo.height == 56 (active, names: CMAppLogo:0x7f8631f535c0 )>", "<NSLayoutConstraint:0x600001778050 UILayoutGuide:0x600000e2ea00'UIViewSafeAreaLayoutGuide'.bottom == UIStackView:0x7f8631f52b60.bottom + 32 (active)>", "<NSLayoutConstraint:0x60000177b070 UIStackView:0x7f8631f52b60.top == UILayoutGuide:0x600000e2ea00'UIViewSafeAreaLayoutGuide'.top + 24 (active)>", "<NSLayoutConstraint:0x60000177ea80 'UISV-canvas-connection' UIStackView:0x7f8631f52b60.top == CMAppLogo.top (active, names: CMAppLogo:0x7f8631f535c0 )>", "<NSLayoutConstraint:0x60000177fbb0 'UISV-canvas-connection' V:[CMAppLogo]-(0)-| (active, names: CMAppLogo:0x7f8631f535c0, '|':UIStackView:0x7f8631f52b60 )>", "<NSLayoutConstraint:0x60000177fa70 'UIView-Encapsulated-Layout-Height' CriticalMaps.SettingsFooterView:0x7f8631f524a0.height == 156 (active)>", "<NSLayoutConstraint:0x600001779360 'UIViewSafeAreaLayoutGuide-bottom' V:[UILayoutGuide:0x600000e2ea00'UIViewSafeAreaLayoutGuide']-(0)-| (active, names: '|':CriticalMaps.SettingsFooterView:0x7f8631f524a0 )>", "<NSLayoutConstraint:0x60000177b660 'UIViewSafeAreaLayoutGuide-top' V:|-(0)-[UILayoutGuide:0x600000e2ea00'UIViewSafeAreaLayoutGuide'] (active, names: '|':CriticalMaps.SettingsFooterView:0x7f8631f524a0 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600001778d20 CMAppLogo.height == 56 (active, names: CMAppLogo:0x7f8631f535c0 )>

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-04-11 21:37:26.613142+0200 CriticalMaps[2427:80984] [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. ( "<NSLayoutConstraint:0x600001732fd0 V:[UILabel:0x7f8671c72bc0'GPS']-(0)-| (active, names: '|':UITableViewCellContentView:0x7f8671c725a0 )>", "<NSLayoutConstraint:0x600001733020 V:|-(0)-[UILabel:0x7f8671c72bc0'GPS'] (active, names: '|':UITableViewCellContentView:0x7f8671c725a0 )>", "<NSLayoutConstraint:0x6000017328f0 UILabel:0x7f8671c72bc0'GPS'.height >= 56 (active)>", "<NSLayoutConstraint:0x600001733b10 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7f8671c725a0.height == 56 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000017328f0 UILabel:0x7f8671c72bc0'GPS'.height >= 56 (active)>

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-04-11 21:37:26.613667+0200 CriticalMaps[2427:80984] [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. ( "<NSLayoutConstraint:0x6000014d9cc0 UILabel:0x7f8671c8aa70'Website'.centerY == UITableViewCellContentView:0x7f8671c8a880.centerY (active)>", "<NSLayoutConstraint:0x6000014db7f0 V:[UILabel:0x7f8671c8aa70'Website']-(0)-| (active, names: '|':UITableViewCellContentView:0x7f8671c8a880 )>", "<NSLayoutConstraint:0x6000014d8e60 UILabel:0x7f8671c8aa70'Website'.height >= 56 (active)>", "<NSLayoutConstraint:0x60000174d310 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7f8671c8a880.height == 56 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000014d8e60 UILabel:0x7f8671c8aa70'Website'.height >= 56 (active)>

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-04-11 21:37:26.614103+0200 CriticalMaps[2427:80984] [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. ( "<NSLayoutConstraint:0x60000174d810 UILabel:0x7f8631c31920'Twitter'.centerY == UITableViewCellContentView:0x7f8631c31730.centerY (active)>", "<NSLayoutConstraint:0x60000174d950 V:[UILabel:0x7f8631c31920'Twitter']-(0)-| (active, names: '|':UITableViewCellContentView:0x7f8631c31730 )>", "<NSLayoutConstraint:0x60000174d7c0 UILabel:0x7f8631c31920'Twitter'.height >= 56 (active)>", "<NSLayoutConstraint:0x60000174def0 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7f8631c31730.height == 56 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x60000174d7c0 UILabel:0x7f8631c31920'Twitter'.height >= 56 (active)>

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-04-11 21:37:26.614450+0200 CriticalMaps[2427:80984] [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. ( "<NSLayoutConstraint:0x60000174e1c0 UILabel:0x7f8631c48e50'Facebook'.centerY == UITableViewCellContentView:0x7f8631c48c60.centerY (active)>", "<NSLayoutConstraint:0x60000174e210 V:[UILabel:0x7f8631c48e50'Facebook']-(0)-| (active, names: '|':UITableViewCellContentView:0x7f8631c48c60 )>", "<NSLayoutConstraint:0x60000174e0d0 UILabel:0x7f8631c48e50'Facebook'.height >= 56 (active)>", "<NSLayoutConstraint:0x60000174e940 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7f8631c48c60.height == 56 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x60000174e0d0 UILabel:0x7f8631c48e50'Facebook'.height >= 56 (active)>

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.

mltbnz commented 5 years ago

life is too short to satisfy auto-layout 😉 Cool Website though. Didn't know that. I think because the Settingscontroller is resetting the size of the footer while layout its subviews it makes autolayout throw this. I will have a look into it since I wanted to use a xib there :)