Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/119.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/198.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios TableView框架更改-单元格布局错误?_Ios_Swift_Autolayout_Tableview - Fatal编程技术网

Ios TableView框架更改-单元格布局错误?

Ios TableView框架更改-单元格布局错误?,ios,swift,autolayout,tableview,Ios,Swift,Autolayout,Tableview,更改tableView的高度(约束)会导致单元格布局无效 在这种情况下,键盘的出现-消失会改变高度 错误视频: 我真的不明白,但只有当我发送一条消息,然后关闭键盘时才会发生这种情况。只发生在第一个出现的细胞上 更新1 所以这似乎是由于一些约束冲突 2019-06-19 21:30:59.206037+0200 PipeTest[80638:64224450] [LayoutConstraints] Unable to simultaneously satisfy constraints.

更改tableView的高度(约束)会导致单元格布局无效

在这种情况下,键盘的出现-消失会改变高度


错误视频:

我真的不明白,但只有当我发送一条消息,然后关闭键盘时才会发生这种情况。只发生在第一个出现的细胞上


更新1 所以这似乎是由于一些约束冲突

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.
2019-06-19 21:30:59.206037+0200管道测试[80638:64224450][布局约束]无法同时满足约束。
可能下面列表中至少有一个约束是您不想要的。
试试这个:
(1) 看看每一个约束,试着找出你不期望的;
(2) 找到添加了不需要的约束的代码,然后修复它。
(
“id:,常数:150.0”,
“id:,常数:0.0”,
“id:,常数:0.0”,
“id:,常数:0.0”,
“id:,常数:0.0”,
“id:,常数:4.0”,
“id:,常数:0.0”,
“id:,常数:0.0”,
“id:UISV画布连接,常量:0.0”,
“id:UISV画布连接,常量:0.0”,
“id:UIView bottomMargin导向约束,常数:8.0”,
“id:UIView封装布局高度,常数:62.0”,
id:UIView topMargin导向约束,常数:8.0
)
将尝试通过打破约束进行恢复
id:,常数:150.0
在UIViewAlertForUnsatifiableConstraints处创建一个符号断点,以便在调试器中捕获该断点。
中列出的UIView上UIConstraintBasedLayoutDebugging类别中的方法也可能会有所帮助。
但正如我前面提到的,只有在tableView正在转换时才会发生这种情况

如果它的框架是静止的,就不存在这样的问题

有人吗(

更新2 这是请求的单元格:

更新3 (使聊天信息更加简单,但仍然会出现错误)

以下是所需的屏幕截图:


您是否在故事板中设置了约束的屏幕截图?或者如果您通过编程设置了约束,是否有代码示例?@Olympilotre我更新了线程!将整个单元格上载到dropbox!我真的对这个问题感到迷茫:(您的xib约束的屏幕截图会更好。对我来说,它来自于
UIVIew封装高度
。看看这篇文章,它看起来很相关: