mic*_*ica 24 cocoa-touch uiactivityindicatorview ios
如何在UIActivityIndicatorView旋转时禁用所有输入?
谢谢
Rok*_*arc 52
您可以beginIgnoringInteractionEvents在启动微调器时调用
[[UIApplication sharedApplication] beginIgnoringInteractionEvents];
Run Code Online (Sandbox Code Playgroud)
而endIgnoringInteractionEvents当你停止它.
[[UIApplication sharedApplication] endIgnoringInteractionEvents];
Run Code Online (Sandbox Code Playgroud)
只需确保您的代码始终到达您调用的位置endIgnoringInteractionEvents,否则您的应用程序将冻结(从用户的角度来看).
小智 6
在Swift 3.0中:
要禁用互动:
UIApplication.shared.beginIgnoringInteractionEvents()
Run Code Online (Sandbox Code Playgroud)
要恢复互动:
UIApplication.shared.endIgnoringInteractionEvents()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10308 次 |
| 最近记录: |