Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/96.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIAlertController和UIViewAlertForUnsatifiableConstraints错误_Ios_Swift_Swift5_Xcode10.2 - Fatal编程技术网

Ios UIAlertController和UIViewAlertForUnsatifiableConstraints错误

Ios UIAlertController和UIViewAlertForUnsatifiableConstraints错误,ios,swift,swift5,xcode10.2,Ios,Swift,Swift5,Xcode10.2,昨天我升级到了Xcode 10.2,开始使用Swift 5,在弹出我的UIAlertControllerphoto提示符时注意到了这个错误。我不记得在Xcode 10.1中见过它 Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600001321e00 UIView:0x7fe1246070a0.width == - 16 (active)> Make a symbolic breakp

昨天我升级到了Xcode 10.2,开始使用Swift 5,在弹出我的
UIAlertController
photo提示符时注意到了这个错误。我不记得在Xcode 10.1中见过它

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600001321e00 UIView:0x7fe1246070a0.width == - 16   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
我尝试在
promptPhoto()
方法中使用此代码来设置
UIAlertController
的宽度,但没有效果

let width:NSLayoutConstraint=NSLayoutConstraint(项目:prompt.view!,
属性:NSLayoutConstraint.attribute.width,
relatedBy:NSLayoutConstraint.Relation.equal,
toItem:无,
属性:NSLayoutConstraint.attribute.notanaAttribute,
乘数:1,
常量:self.view.frame.width)
prompt.view.addConstraint(宽度)
有没有办法控制
UIAlertController
的宽度,以便我可以消除错误消息


提前谢谢。

这可能是一个Xcode错误。苹果还没有修复。这个错误发生在最新的Xcode 11.3.1版本中,也发生在您的
构建设置->Swift编译器-语言中,使用
Swift 5
Swift 4.2
?@Nizzam Swift语言版本被设置为Swift 5,我想说不用担心,这似乎是UIAlertController中的内部布局不一致。这似乎是一个错误:是否仍然没有修复此问题?保持打印错误Xcode 12.2-相同