gpt4 book ai didi

ios - "Unable to simultaneously satisfy constraints"个人热点蓝条

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:00:14 26 4
gpt4 key购买 nike

当我运行我的应用程序并启用个人热点时,我收到以下警告,因此个人热点蓝条出现在屏幕顶部。有办法解决这个问题吗?

2016-05-19 09:07:55.589 RemindersPro[591:121237] 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.
(
"<NSLayoutConstraint:0x145d7ff30 V:|-(20)-[UIInputSetContainerView:0x145e77b70] (Names: '|':UITextEffectsWindow:0x145d7e8d0 )>",
"<NSLayoutConstraint:0x145d307a0 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x145e77b70] (Names: '|':UITextEffectsWindow:0x145d7e8d0 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x145d7ff30 V:|-(20)-[UIInputSetContainerView:0x145e77b70] (Names: '|':UITextEffectsWindow:0x145d7e8d0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
updating
reminderListsStructure of 24 calendars recreated.

我尝试按照 In Call Status Bar (Unable to Satisfy Constraints) 中的建议修复它通过将以下函数添加到我的 AppDelegate 中。不幸的是,它没有帮助。

func application(application: UIApplication, willChangeStatusBarFrame newStatusBarFrame: CGRect) {
for window in UIApplication.sharedApplication().windows {
if window.dynamicType.self.description().containsString("UITextEffectsWindow") {
window.removeConstraints(window.constraints)
}
}
}

最佳答案

该错误意味着您添加到个人热点栏的两个约束相互冲突,这意味着它们告诉该栏去两个不同的地方。由于这是不可能的,您会看到该错误。为了修复它,您必须查看您添加到栏中的约束,看看其中两个约束是否会将栏放在不同的位置。 Xcode 实际上为您提供了这两个冲突的约束,并在错误中显示了它们。

要摆脱所有限制,试试这个:

func application(application: UIApplication, willChangeStatusBarFrame newStatusBarFrame: CGRect) {
for window in UIApplication.sharedApplication().windows {
window.removeConstraints(window.constraints)
}
}

关于ios - "Unable to simultaneously satisfy constraints"个人热点蓝条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37312677/

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