小编bvh*_*bvh的帖子

UIAlertController和UIViewAlertForUnsatisfiableConstraints错误

我昨天升级到Xcode 10.2,并开始使用Swift 5,当出现UIAlertController照片提示时会注意到此错误。我不记得在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.
Run Code Online (Sandbox Code Playgroud)

我读过此问题如何捕获UIViewAlertForUnsatisfiableConstraints? 并能够将错误定位到我的位置UIAlertController(以红色突出显示)

在此处输入图片说明

这是我的代码:

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.
Run Code Online (Sandbox Code Playgroud)

我试图UIAlertController通过在我的promptPhoto()方法内部使用此代码来设置宽度,但无济于事。


 @objc private func promptPhoto() {

    let prompt = UIAlertController(title: "Choose a Photo",
                                   message: …
Run Code Online (Sandbox Code Playgroud)

ios swift swift5 xcode10.2

12
推荐指数
1
解决办法
876
查看次数

Xcode 10 - 界面构建器文档

我无法将现有故事板的 Interface Builder Document 版本更改为 Xcode 10.0。在选择 Xcode 10.0、提示时保存并关闭并重新打开我的故事板后,它总是恢复到 Xcode 9.0。即使在创建新的故事板时,它也默认为 Xcode 9.0

有没有办法让 Xcode 10.0 成为我的默认版本?

先感谢您。

xcode ios xcode10

7
推荐指数
0
解决办法
753
查看次数

标签 统计

ios ×2

swift ×1

swift5 ×1

xcode ×1

xcode10 ×1

xcode10.2 ×1