问题描述
您可能都知道iOS会在将应用程序投射到后台之前对其进行屏幕截图。这通常是为了获得更好的用户体验,例如快速动画来恢复应用程序等等。我不希望我的应用程序屏幕截图存储在设备上,但我希望多任务仍然存在。
You all might know that iOS takes a screen shot of your application before throwing it into the background. This is usually for a better User experience like quick animation to bring the app back and so on. I don't want my app screen shot to be stored on the device, but I want the multitasking to still exist.
我出来了一个解决方案,但我是不确定我是否正朝着正确的方向前进。因此,当调用 applicationDidEnterBackground
时 - 我放入了一个将由操作系统捕获的叠加图像,一旦应用程序进入前景,我将删除叠加层。我不确定这是否会起作用,但我正在实现这一目标。同时,对此的任何其他想法将帮助我找出攻击此问题的最佳方式。
I came out with a solution but I'm not sure if I'm heading in the right direction. So, when the applicationDidEnterBackground
is called -- I put in an overlay image that will be captured by the OS, and once the app enters foreground, I will remove the overlay. I'm not sure if this is going to work but I'm on my way to implement this. Meanwhile, any other thoughts on this will help me figure out the optimal way of attacking this issue.
推荐答案
你在右边跟踪。这是Apple建议的方法中:
You are on the right track. This is Apple's recommended way to do this as noted in the iOS Application Programming Guide:
这篇关于在进入后台之前阻止iOS进行应用程序的屏幕截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!