-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Description
Hi, @smileyborg, I'm so excited to use PureLayout when lost in large numbers of constraints added for views. However, when I tried to put the same code in a custom UIView enbedded with a tableview, it shows lots of warnings in the console.
Here's the warnings.
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)
(
"<NSLayoutConstraint:0x7fa5e1f5a300 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x7fa5e1f51930(0)]>",
"<NSLayoutConstraint:0x7fa5e1db41d0 UILabel:0x7fa5e1f52600'The correct API to use is...'.trailing == UITableViewCellContentView:0x7fa5e1f51930.trailing - 15>",
"<NSLayoutConstraint:0x7fa5e1d95df0 H:|-(15)-[UILabel:0x7fa5e1f52600'The correct API to use is...'] (Names: '|':UITableViewCellContentView:0x7fa5e1f51930 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fa5e1db41d0 UILabel:0x7fa5e1f52600'The correct API to use is...'.trailing == UITableViewCellContentView:0x7fa5e1f51930.trailing - 15>
I wonder what on earth the difference is between setting constraints in a tableview and in a tableviewcontroller. As fresh to autolayout, what should I pay attention to when handling these kinds of problems? Could you give me some suggestions?
Hope to hear from you. Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels