kis*_*011 9 uialertview uipopovercontroller ios swift uialertcontroller
我正在尝试显示(AlertController)操作表.但是我在控制台中逐渐减弱了"<_UIPopoverBackgroundVisualEffectView 0x7fd65ef76ec0>被要求设置其不透明度的动画.这将导致效果出现故障,直到不透明度返回到1."
这是我的代码: -
extension GroupDataView {
func callDot (sender : UIButton)
{
let alert = UIAlertController(title: nil, message: nil,
preferredStyle: .actionSheet)
alert.addAction(UIAlertAction(title: "Edit Group", style: .default , handler:{ (action)in
print("User click Edit Group")
}))
alert.addAction(UIAlertAction(title: "Create Folder", style: .default , handler:{ (action)in
print("User click Create Folder button")
}))
alert.addAction(UIAlertAction(title: "Delete Group", style: .destructive , handler:{ (action)in
print("User click Delete Group button")
}))
if let popoverController = alert.popoverPresentationController {
popoverController.sourceView = sender
popoverController.sourceRect = sender.bounds
self.present(alert, animated: true, completion: {
print("completion block")
})
}
else
{
self.present(alert, animated: true, completion: {
print("completion block")
})
}
}
}
Run Code Online (Sandbox Code Playgroud)
我不知道为什么在控制台中显示此警告.ActionSheet正在准备但是如何删除该警告?谢谢
请参阅Apple开发者论坛上@Hardy的回答:来自UIPopover的警告信息 †
...似乎是iOS中的一个错误.但它似乎并不重要.虽然 - 我相信 - 有时UIAlertController下面的区域没有正确绘制.虽然底层视图的背景不是黑色,但我可以在短时间内看到黑色背景闪烁.
†缓存在谷歌这里
| 归档时间: |
|
| 查看次数: |
5332 次 |
| 最近记录: |