1. You can’t find the error by using the breakpoint tool. Finally, you read the error information carefully
2. Error information
[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:0x608000098a60 UIView:0x7fcb7b428fe0.height == 50 (active)>",
"<NSLayoutConstraint:0x608000098060 V:|-(0)-[UIView:0x7fcb7b428fe0] (active, names: '|':UITableViewCellContentView:0x7fcb7b42bd40 )>",
"<NSLayoutConstraint:0x608000097b60 V:[UIView:0x7fcb7b42ed00]-(0)-| (active, names: '|':UITableViewCellContentView:0x7fcb7b42bd40 )>",
"<NSLayoutConstraint:0x608000097c00 V:[UIView:0x7fcb7b428fe0]-(0)-[UIView:0x7fcb7b42ed00] (active)>",
"<NSLayoutConstraint:0x60000009bf80 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fcb7b42bd40.height == 49.5 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x608000098a60 UIView:0x7fcb7b428fe0.height == 50 (active)>
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.
3.Analytis
"<NSLayoutConstraint:0x608000098a60 UIView:0x7fcb7b428fe0.height == 50 (active)>",
"<NSLayoutConstraint:0x60000009bf80 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fcb7b42bd40.height == 49.5 (active)>"
The first sentence of code information is that there is an interface in the view with a height of 50
the second sentence means cell_The height of contentview is 49.5
Here comes the problem
The contentview is not as large as the self view I set, and I set clips to view = yes for the cell
if the constraint conflicts, Xcode will give an error message
Increase the height of the cell or decrease the height of the vie
Similar Posts:
- ScrollView has ambiguous scrollable content height
- ORA-02292: integrity constraint
- [Solved] Java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout
- Ffmpeg scaling — the solution of “width / height not divisible by 2”
- [Solved] echart Error: Can’t get dom width or height
- How to fix error messages related to sap ui5 aggregation with cardinality 0.. 1
- UICollectionView must be initialized with a non-nil layout parameter [Solved]
- [Solved] android.view.InflateException: Binary XML file line #0: Error inflating class ImageView
- Document.body.clientheight cannot get the browser page height correctly
- Flutter ListView Error: RenderBox was not laid out: RenderViewport#680c1 NEEDS-LAYOUT NEEDS-PAINT