【发布时间】:2018-07-17 12:47:22
【问题描述】:
在设备中启动我的应用程序后, 如果显示个人热点, xcode 在控制台中写入:
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:0x146dd7cf0 V:|-(20)-[UIInputSetContainerView:0x146dd43e0] (Names: '|':UITextEffectsWindow:0x146dd2ee0 )>",
"<NSLayoutConstraint:0x146dbd950 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x146dd43e0] (Names: '|':UITextEffectsWindow:0x146dd2ee0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x146dd7cf0 V:|-(20)-[UIInputSetContainerView:0x146dd43e0] (Names: '|':UITextEffectsWindow:0x146dd2ee0 )>
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.
我的应用不使用自动布局或约束。 (ios 9.3.5, ios 11)
问题还在于rootViewController在正常状态下是0,0原点, 但是当有呼叫时它是 0,20,我无法将其更改为 0,0。
编辑: 我设法通过添加来解决这个问题
-(void)viewDidLayoutSubviews
{
self.view.frame = [[UIScreen mainScreen] bounds];
}
但是有没有办法消除热点/通话限制?
当热点/通话处于活动状态时,我希望 view.frame.origin 也为 0,0。
【问题讨论】:
标签: ios objective-c uiviewcontroller ios-autolayout