每次在模拟手机中显示 UIAlertController 操作表时,我都会收到此警告。代码没什么花哨的。
let action1 = UIAlertAction(title: "Action 1", style: .default) { _ in }
let action2 = UIAlertAction(title: "Action 2", style: .default) { _ in }
let cancel = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
let alert = UIAlertController(title: "title", message: "message", preferredStyle: .actionSheet)
alert.addAction(action1)
alert.addAction(action2)
alert.addAction(cancel)
self.present(alert, animated: true)
我正在运行 Xcode 10.2 (10E125)、Swift 5。该约束似乎超出了我的控制范围,但如果我做错了什么,请告知。
IB 的屏幕截图显示了约束操作菜单的图标。您还可以单击约束本身来编辑或删除它们。
查看各种下拉菜单。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)