<_UIPopoverBackgroundVisualEffectView>被要求为其不透明度设置动画 [英] <_UIPopoverBackgroundVisualEffectView> is being asked to animate its opacity

查看:20
本文介绍了<_UIPopoverBackgroundVisualEffectView>被要求为其不透明度设置动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试显示 (AlertController) 操作表.但是我在控制台中得到了这个减弱"<_UIPopoverBackgroundVisualEffectView 0x7fd65ef76ec0> 被要求为其不透明度设置动画.这将导致效果出现破坏,直到不透明度恢复为 1.

I am trying to show an (AlertController) Action sheet. But I am getting this waning in console " <_UIPopoverBackgroundVisualEffectView 0x7fd65ef76ec0> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 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 正在正常运行,但如何删除该警告?谢谢

I don't know why this warning is showing in console. ActionSheet is coming properly but how to remove that warning? Thanks

推荐答案

iOS Bug

在 Apple 开发者论坛上查看 @Hardy 的回答:来自 UIPopover 的警告信息

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

... seems to be a bug in iOS. But it does not seem to be critical. Though - I believe - that sometimes the area below the UIAlertController is not correctly drawn. I can see for a short period of time a black background flashing although the background of the underlying view is not black.

缓存在 Google 这里

Cached on Google here

这篇关于&lt;_UIPopoverBackgroundVisualEffectView&gt;被要求为其不透明度设置动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆