我正在尝试显示(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: { …Run Code Online (Sandbox Code Playgroud)