mu29 / PagingTableView

The simplest way to make your table view paginable
MIT License
56 stars 14 forks source link

Error on layout constraints #3

Closed kuoliangkwong closed 5 years ago

kuoliangkwong commented 6 years ago

I received this when using this

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:0x6000024d45a0 UIImageView:0x7fb5fc5a9c40.height == 60   (active)>",
    "<NSLayoutConstraint:0x6000024d4910 UIImageView:0x7fb5fc5a9c40.top == UILabel:0x7fb5fe846a20'Blood Donation Drive'.top   (active)>",
    "<NSLayoutConstraint:0x6000024d49b0 UILabel:0x7fb5fe846a20'Blood Donation Drive'.top == UITableViewCellContentView:0x7fb5fc5a9a50.topMargin + 10   (active)>",
    "<NSLayoutConstraint:0x6000024d4820 UITableViewCellContentView:0x7fb5fc5a9a50.bottomMargin >= UIImageView:0x7fb5fc5a9c40.bottom + 10   (active)>",
    "<NSLayoutConstraint:0x6000024d9590 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x600003ed07e0'UIViewLayoutMarginsGuide']-(8)-|   (active, names: '|':UITableViewCellContentView:0x7fb5fc5a9a50 )>",
    "<NSLayoutConstraint:0x6000024d0a00 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fb5fc5a9a50.height == 96   (active)>",
    "<NSLayoutConstraint:0x6000024da5d0 'UIView-topMargin-guide-constraint' V:|-(8)-[UILayoutGuide:0x600003ed07e0'UIViewLayoutMarginsGuide']   (active, names: '|':UITableViewCellContentView:0x7fb5fc5a9a50 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x6000024d45a0 UIImageView:0x7fb5fc5a9c40.height == 60   (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.

I'm using UITableView.automaticDimension for row height

kuoliangkwong commented 5 years ago

Apology~ Please ignore this. This is caused from my code