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

Conflicting layout constraints #61

Open
v4lli opened this issue Jan 18, 2021 · 0 comments
Open

Conflicting layout constraints #61

v4lli opened this issue Jan 18, 2021 · 0 comments
Milestone

Comments

@v4lli
Copy link
Member

v4lli commented Jan 18, 2021

When launching the app:

2021-01-18 23:26:56.604288+0100 meteocool[58665:7334719] [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:0x600003af8140 h=&-& v=&-- UIButton:0x7ff024522cf0.width == 24   (active)>",
    "<NSAutoresizingMaskLayoutConstraint:0x600003af8190 h=&-& v=&-- UIButton:0x7ff024522cf0.minX == 1.01154*UIView:0x7ff02452d740.width - 24.2769   (active)>",
    "<NSLayoutConstraint:0x600003afc0a0 H:[UIButton:0x7ff024522cf0]-(-2)-|   (active, names: '|':UIView:0x7ff02452d740 )>",
    "<NSLayoutConstraint:0x600003af8780 'UIView-Encapsulated-Layout-Width' UIView:0x7ff02452d740.width == 414   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600003afc0a0 H:[UIButton:0x7ff024522cf0]-(-2)-|   (active, names: '|':UIView:0x7ff02452d740 )>

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.
@v4lli v4lli added this to the 2.1 milestone Jan 18, 2021
@v4lli v4lli modified the milestones: 2.1 Cirrus, 2.2 Stratus Jul 3, 2021
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