正在要求<_UIPopoverBackgroundVisualEffectView>设置其不透明度

我试图显示(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") }) } } } 

我不知道为什么这个警告显示在控制台。 ActionSheet正常,但如何删除该警告? 谢谢

iOS Bug

在Apple Developer Forum上查看@Hardy的回答: 来自UIPopover的警告消息

…似乎是iOS中的一个错误。 但这似乎并不重要。 虽然 – 我相信 – 有时UIAlertController下方的区域未被正确绘制。 虽然底层视图的背景不是黑色,但我可以在短时间内看到黑色背景闪烁。

caching在谷歌这里

我有同样的问题,我通过设置self.present或/和self.dismiss函数中的animated: false解决它。 请参阅https://forums.developer.apple.com/thread/53677中的最后一条评&#x8BBA;

我意识到这是一个古老的问题,但我只是面临同样的问题,我find了一个解决方法,延迟了0.001秒的演示文稿,所以当你通常调用这个函数,我用这个代码的延迟

 [self performSelector:@selector(viewBookmark:) withObject:bookmarkBarButton afterDelay:0.001]; 

请原谅OBJ-C,但类似的延迟应该有相同的结果,同时不显示2个视图。