3

Changing the tableView's height (constraint) results invalid cell layout.

In this case the keyboard appearing - disappearing changes the height.


Video of the bug: https://youtu.be/DOpyKzOUzdg

I don't really understand, but it happens only if I send a message, then dismiss the keyboard. And only happens to the first appearing cell.


UPDATE 1

So it seems like that it's due to some constraint conflict

2019-06-19 21:30:59.206037+0200 PipeTest[80638:64224450] [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. 
(
    "id: , constant: 150.0",
    "id: , constant: 0.0",
    "id: , constant: 0.0",
    "id: , constant: 0.0",
    "id: , constant: 0.0",
    "id: , constant: 4.0",
    "id: , constant: 0.0",
    "id: , constant: 0.0",
    "id: UISV-canvas-connection, constant: 0.0",
    "id: UISV-canvas-connection, constant: 0.0",
    "id: UIView-bottomMargin-guide-constraint, constant: 8.0",
    "id: UIView-Encapsulated-Layout-Height, constant: 62.0",
    "id: UIView-topMargin-guide-constraint, constant: 8.0"
)

Will attempt to recover by breaking constraint 
id: , constant: 150.0

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.

But as I mentioned before, it happens only if the tableView is transforming.

If its frame is still, there's no such a problem.

Someone? :(

UPDATE 2

Here's the cell as requested:

https://www.dropbox.com/s/nixjl9uygfxsj48/OwnChatMessageCell.xib?dl=0

UPDATE 3

(Made the chat message even simplier but still the bug appears)

Here's the screenshot as requested:

enter image description here

Kárpáti András
  • 1,221
  • 1
  • 16
  • 35
  • do you have a screenshot of your constraints set in storyboard? or a code sample if you set constraints programatically ? – Olympiloutre Jun 20 '19 at 01:44
  • @Olympiloutre I updated the thread! Uploaded the whole cell to dropbox! I'm really lost with this problem :( – Kárpáti András Jun 20 '19 at 09:37
  • a screenshot of your xib constraints would be better. – Olympiloutre Jun 20 '19 at 23:22
  • To me it comes from the `UIVIew-Encapsulated-Height`. Take a look at this post it looks related: https://stackoverflow.com/questions/25059443/what-is-nslayoutconstraint-uiview-encapsulated-layout-height-and-how-should-i – Olympiloutre Jun 24 '19 at 00:05

0 Answers0