如何在添加endIgnoringInteractionEvents之前匹配beginIgnoringInteractionEvents

Bab*_*oot 6 ios

我正在使用这两个功能[[UIApplication sharedApplication] beginIgnoringInteractionEvents];,[[UIApplication sharedApplication] endIgnoringInteractionEvents];而我正在从服务器下载数据.

我在日志中遇到错误.

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
Run Code Online (Sandbox Code Playgroud)

我试图在几个链接上搜索,但找不到合适的解决方案.

如何在不使用beginIgnoringInteractionEvents的情况下禁用触摸屏?

什么是" - [UIApplication beginIgnoringInteractionEvents]溢出.忽略."?

忽略AppKit中的UI事件

beginIgnoringInteractionEvents或userInteractionEnabled = NO无法按预期工作

Rok*_*arc 11

你总是可以检查.

if ([[UIApplication sharedApplication] isIgnoringInteractionEvents])...
Run Code Online (Sandbox Code Playgroud)

  • @Rok:即使我没有调用beginIgnoringInteractionEvents,isIgnoringInteractionEvents也会返回true。关闭警报视图后会发生这种情况。知道会发生什么吗? (2认同)