applicationDidEnterBackground屏幕捕

applicationDidEnterBackground屏幕捕

本文介绍了延迟applicationDidEnterBackground屏幕捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当应用程式进入背景时,是否有延迟iOS的萤幕撷取的方法?原因是,我有时显示一个视图,当用户转到主屏幕我希望此视图删除,所以它不显示,当应用程序恢复。这个视图是一个 c> SSHUDView 在它关闭后将焦点返回主窗口后执行

Which is probably why it's so tricky to get rid of. You might try to do what SSHUDView does after it dismisses itself to return focus to the main window:

[[[[UIApplication sharedApplication] windows] objectAtIndex:0] makeKeyWindow];

当hud视图自行关闭时,它会发送 resignKeyWindow 到它的私有 _hudWindow 对象,你可能会尝试获取一个句柄,然后你返回焦点到主窗口,如下:

When the hud view dismissed itself it sends resignKeyWindow to it's private _hudWindow object, you could possibly try to get a handle on that before you return focus to the main window, like so:

[[[[UIApplication sharedApplication] windows] objectAtIndex:1] resignKeyWindow];

但它可能会导致意想不到的问题,因为您绕过 SSHUDView API ...

But it may cause unexpected problems because you're bypassing the SSHUDView API...

这篇关于延迟applicationDidEnterBackground屏幕捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 23:12