LoginSignup
2
0

More than 5 years have passed since last update.

Popoverを消した時に出た警告と対処方法

Posted at

はじめに

Popoverを消した後でこの警告が出ました。
[Warning] <_UIPopoverBackgroundVisualEffectView 0x7fe5b7e2cb60> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

致命的ではないので気にしなければよいのもかれしませんが、気持ちが悪いので、警告を消す方法を探しました。対処方法についてメモを残します。

対処法

dismiss(animated: true, completion: {})
を呼んだ時点で警告が表示されています。

この点、animatedにfalseを指定することで解決しました。
dismiss(animated: false, completion: {})

感想

iOSのバグなら善処してほしいですね。VisualEffectViewやopacityというキーワードが出てきたので、無駄にコードを見返してしまいました。見慣れないエラーメッセージは、一度、直接に検索する癖をつけたほうが生産的かもしれません。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0