gpt4 book ai didi

SwiftUi 无法同时满足约束 - 当焦点在文本字段和键盘上时打开

转载 作者:行者123 更新时间:2023-12-04 13:29:16 27 4
gpt4 key购买 nike

当我打开带有文本字段的工作表,并专注于文本字段时,会出现键盘并显示此消息:

 2021-02-06 22:29:35.817858+0100 OrientationEPS[4026:269878] [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.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(

"<NSAutoresizingMaskLayoutConstraint:0x6000030b3250 h=--& v=--& _UIButtonBarButton:0x7fea6492cf40.height == 0 (active)>",
"<NSLayoutConstraint:0x6000030fce60 _UIUCBKBSelectionBackground:0x7fea64930c50.bottom == _UIButtonBarButton:0x7fea6492cf40.bottom - 6 (active)>",
"<NSLayoutConstraint:0x6000030ec7d0 V:|-(6)-[_UIUCBKBSelectionBackground:0x7fea64930c50] (active, names: '|':_UIButtonBarButton:0x7fea6492cf40 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000030fce60 _UIUCBKBSelectionBackground:0x7fea64930c50.bottom == _UIButtonBarButton:0x7fea6492cf40.bottom - 6 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
我真的不明白绿色部分说的是什么......(NSAutoresizingMaskLayoutConstraint - NSLayoutConstraint)
你能解释一下这条消息吗?
我可以添加我的代码,但我不知道我必须发布哪个部分...
此错误消息出现在我所有以文本字段为焦点的工作表上。 (3 在我的应用程序中)
我的应用程序的屏幕截图。
my app

最佳答案

我在更新到 12.4 后才开始注意到这一点(尽管我之前可能已经错过了)。经过大量调查,我发现每次 UITextField 变为事件状态时我都会收到相同的消息。
要确认这一点,只需制作一个只有一个 UITextField 的简单应用程序,无论约束如何设置,都会出现相同的警告。

关于SwiftUi 无法同时满足约束 - 当焦点在文本字段和键盘上时打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66082340/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com