yysskk / SwipeMenuViewController

Swipable tab and menu View and ViewController.
MIT License
1.29k stars 131 forks source link

[LayoutConstraints] Unable to simultaneously satisfy constraints. #43

Closed codepgq closed 5 years ago

codepgq commented 6 years ago

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:0x1c40927a0 UIView:0x104449c20.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c0282bc0 UIView:0x104341350.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c0282c60 H:[UIView:0x104449c20]-(0)-[UIView:0x104341350] (active)>", "<NSLayoutConstraint:0x1c4098150 UIView:0x10447a420.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c40981f0 H:[UIView:0x104341350]-(0)-[UIView:0x10447a420] (active)>", "<NSLayoutConstraint:0x1c0282e40 UIView:0x10447c3f0.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c0282ee0 H:[UIView:0x10447a420]-(0)-[UIView:0x10447c3f0] (active)>", "<NSLayoutConstraint:0x1c4098470 UIView:0x1043362c0.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c4098510 H:[UIView:0x10447c3f0]-(0)-[UIView:0x1043362c0] (active)>", "<NSLayoutConstraint:0x1c02831b0 UIView:0x10438d730.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c0283250 H:[UIView:0x1043362c0]-(0)-[UIView:0x10438d730] (active)>", "<NSLayoutConstraint:0x1c4098740 UIView:0x104482c50.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c40987e0 H:[UIView:0x10438d730]-(0)-[UIView:0x104482c50] (active)>", "<NSLayoutConstraint:0x1c02834d0 UIView:0x1044850c0.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c0283570 H:[UIView:0x104482c50]-(0)-[UIView:0x1044850c0] (active)>", "<NSLayoutConstraint:0x1c4098a60 UIView:0x104486ea0.width == SwipeMenuViewController.ContentScrollView:0x104930c00.width (active)>", "<NSLayoutConstraint:0x1c4098b00 H:[UIView:0x1044850c0]-(0)-[UIView:0x104486ea0] (active)>", "<NSLayoutConstraint:0x1c4098c40 H:[UIView:0x104486ea0]-(0)-[UIView:0x104449c20] (active)>", "<SnapKit.LayoutConstraint:0x1c42af240@DeviceNewListController.swift#59 UICollectionView:0x104925a00.left == UIView:0x104341350.left + 10.0>", "<SnapKit.LayoutConstraint:0x1c42af480@DeviceNewListController.swift#60 UICollectionView:0x104925a00.right == UIView:0x104341350.right - 10.0>" )

Will attempt to recover by breaking constraint <SnapKit.LayoutConstraint:0x1c42af480@DeviceNewListController.swift#60 UICollectionView:0x104925a00.right == UIView:0x104341350.right - 10.0>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.