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

AutoLayout Constraints Conflicts during runtime #1

Open
InfiniteDreamz opened this issue Jun 11, 2021 · 0 comments
Open

AutoLayout Constraints Conflicts during runtime #1

InfiniteDreamz opened this issue Jun 11, 2021 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@InfiniteDreamz
Copy link
Owner

Although the application runs well with the existing code, XCode generates the following logs during runtime indicating auto layout constraints conflict. Please let me know if you have any suggestions on this.

2021-06-11 14:50:58.387759+0530 CollectionView-DynamicSize[7439:284696] [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:0x60000244ec60 UIView:0x7fc998515610.width == 414   (active)>",
    "<NSLayoutConstraint:0x60000244efd0 H:[UIView:0x7fc998515610]-(0)-|   (active, names: '|':UIView:0x7fc99850d670 )>",
    "<NSLayoutConstraint:0x60000244f0c0 H:|-(0)-[UIView:0x7fc998515610]   (active, names: '|':UIView:0x7fc99850d670 )>",
    "<NSLayoutConstraint:0x60000244f2a0 'UIIBSystemGenerated' CollectionView_DynamicSize.DynamicCell:0x7fc9985153b0.leading == UIView:0x7fc99850d670.leading   (active)>",
    "<NSLayoutConstraint:0x60000244f2f0 'UIIBSystemGenerated' H:[UIView:0x7fc99850d670]-(0)-|   (active, names: '|':CollectionView_DynamicSize.DynamicCell:0x7fc9985153b0 )>",
    "<NSLayoutConstraint:0x6000024785a0 'UIView-Encapsulated-Layout-Width' CollectionView_DynamicSize.DynamicCell:0x7fc9985153b0.width == 50   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x60000244ec60 UIView:0x7fc998515610.width == 414   (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.
@InfiniteDreamz InfiniteDreamz self-assigned this Jun 11, 2021
@InfiniteDreamz InfiniteDreamz added the help wanted Extra attention is needed label Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant