gpt4 book ai didi

iphone - 阻止 iOS 在进入后台之前截取应用程序的屏幕截图

转载 作者:IT王子 更新时间:2023-10-29 07:51:14 26 4
gpt4 key购买 nike

你们可能都知道 iOS 会在将应用程序放入后台之前对其进行屏幕截图。这通常是为了获得更好的用户体验,例如快速动画以恢复应用程序等。我不希望我的应用程序屏幕截图存储在设备上,但我希望多任务处理仍然存在。

我想出了一个解决方案,但我不确定我的方向是否正确。因此,当 applicationDidEnterBackground 被调用时——我放入了一个将由操作系统捕获的覆盖图像,一旦应用进入前台,我将删除覆盖。我不确定这是否可行,但我正在实现它。同时,关于此的任何其他想法都将帮助我找出解决此问题的最佳方法。

最佳答案

您走在正确的轨道上。这是 Apple 推荐的执行此操作的方法 as noted in the iOS Application Programming Guide :

Remove sensitive information from views before moving to the background. When an application transitions to the background, the system takes a snapshot of the application’s main window, which it then presents briefly when transitioning your application back to the foreground. Before returning from your applicationDidEnterBackground: method, you should hide or obscure passwords and other sensitive personal information that might be captured as part of the snapshot.

关于iphone - 阻止 iOS 在进入后台之前截取应用程序的屏幕截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7520076/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com