badoo/Chatto

NSLayoutConstraint error when using expandable input and switching input

开放

#577 创建于 2019年5月22日

 (0 条评论) (0 个反应) (0 位负责人)Swift (561 个派生)batch import
bughelp wanted

仓库指标

星标
 (4,166 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Reproducible with the demo app, using the "Chat with expandable input" example.

Steps to reproduce:

  1. Press the keyboard chat input icon.
  2. Press the camera chat input icon.

The console will show the following error:

2019-05-22 10:55:34.230615-0400 ChattoApp[3658:2922342] [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. 
(
    "<_UILayoutSupportConstraint:0x2814a9f90 _UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide'.height == 64   (active)>",
    "<_UILayoutSupportConstraint:0x2814a9810 V:|-(0)-[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide']   (active, names: '|':Chatto.BaseChatViewControllerView:0x101c64670 )>",
    "<NSLayoutConstraint:0x2814a94a0 V:[UIView:0x101ca67e0]-(667)-|   (active, names: '|':Chatto.BaseChatViewControllerView:0x101c64670 )>",
    "<NSLayoutConstraint:0x2814df110 UIView:0x101d53d00.height == 44   (active)>",
    "<NSLayoutConstraint:0x2814c06e0 V:|-(0)-[UIView:0x101d53d00]   (active, names: '|':ChattoAdditions.ChatInputBar:0x101c3ea50 )>",
    "<NSLayoutConstraint:0x2814c27b0 V:[UIView:0x101d53d00]-(0)-|   (active, names: '|':ChattoAdditions.ChatInputBar:0x101c3ea50 )>",
    "<NSLayoutConstraint:0x2814c1900 UIView:0x101ca67e0.top == ChattoAdditions.ChatInputBar:0x101c3ea50.top   (active)>",
    "<NSLayoutConstraint:0x2814c20d0 V:[ChattoAdditions.ChatInputBar:0x101c3ea50]-(0)-|   (active, names: '|':UIView:0x101ca67e0 )>",
    "<NSLayoutConstraint:0x2814aa580 V:[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide']-(>=0)-[UIView:0x101ca67e0]   (active)>",
    "<NSLayoutConstraint:0x2814f4230 'UIView-Encapsulated-Layout-Height' Chatto.BaseChatViewControllerView:0x101c64670.height == 667   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x2814df110 UIView:0x101d53d00.height == 44   (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.
2019-05-22 10:55:34.243398-0400 ChattoApp[3658:2922342] [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. 
(
    "<_UILayoutSupportConstraint:0x2814a9f90 _UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide'.height == 64   (active)>",
    "<_UILayoutSupportConstraint:0x2814a9810 V:|-(0)-[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide']   (active, names: '|':Chatto.BaseChatViewControllerView:0x101c64670 )>",
    "<NSLayoutConstraint:0x2814aa580 V:[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide']-(>=0)-[UIView:0x101ca67e0]   (active)>",
    "<NSLayoutConstraint:0x2814a94a0 V:[UIView:0x101ca67e0]-(667)-|   (active, names: '|':Chatto.BaseChatViewControllerView:0x101c64670 )>",
    "<NSLayoutConstraint:0x2814f4230 'UIView-Encapsulated-Layout-Height' Chatto.BaseChatViewControllerView:0x101c64670.height == 667   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x2814aa580 V:[_UILayoutSpacer:0x2808e9e00'UIVC-topLayoutGuide']-(>=0)-[UIView:0x101ca67e0]   (active)>

贡献者指南