Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有ATMhud。我正在显示带有进度条的 hud。然后我想下载实现。
但用户可以返回之前的视图并停止实现。
我试过推“推黑色视图”,但我只覆盖没有导航/标签栏的当前视图。
在实现完成之前,我如何阻止单击所有内容?
如果我正确理解了您的问题,您希望阻止用户与您的视图进行交互,直到您的加载过程完成。您可以为此设置 Views userInteractionEnabled 属性。
当你在那一刻去加载节目时
self.view.userInteractionEnabled = NO
当你的过程完成之后
self.view.userInteractionEnabled = YES
因此,通过这种方式,您可以防止用户在进程进行时在您的视图上的任何位置进行交互。
希望能帮助到你。