Chatto icon indicating copy to clipboard operation
Chatto copied to clipboard

NSLayoutConstraint error when using expandable input and switching input

Open Mathbl opened this issue 5 years ago • 0 comments

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)>

Mathbl avatar May 22 '19 14:05 Mathbl