从服务器下载数据时,我正在使用这两个函数[[UIApplication sharedApplication] beginIgnoringInteractionEvents];
和[[UIApplication sharedApplication] endIgnoringInteractionEvents];
。
我在日志中遇到错误。
-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
我尝试搜索一些链接,但找不到适合的解决方案。
How do you disable touch to screen without using beginIgnoringInteractionEvents?
What is “-[UIApplication beginIgnoringInteractionEvents] overflow. Ignoring.”?
Ignoring UI Events in AppKit
beginIgnoringInteractionEvents or userInteractionEnabled = NO not working as expected
最佳答案
您可以随时检查。
if ([[UIApplication sharedApplication] isIgnoringInteractionEvents])...