iOS7屏幕捕获预防/检测 [英] iOS7 Screen Capture Prevention / Detection

查看:102
本文介绍了iOS7屏幕捕获预防/检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iOS应用中,我需要阻止屏幕截图捕获(通过按Home + Power按钮的组合),或者需要在将其保存到照片库之前进行检测. 在以前的iOS版本中,在获取屏幕快照touchesCancelled:withEvent之前,此方法将称为,但从iOS7开始,此方法将无效. 苹果提供通知

In my iOS app I need either prevent the screenshot capture (by pressing combination of Home +Power button), or need to detect before it saved to the Photo library . In previous iOS version before taking screenshot touchesCancelled:withEvent this method will called , but iOS7 onwards this wont work. Apple provide a notification

 UIApplicationUserDidTakeScreenshotNotification

用于检测屏幕截图捕获.真正的问题是,只有在将屏幕截图保存在照片库中后才会触发.

for detecting screenshot capture .The real problem is this will fire only after the screenshot is saved in Photo library .

是否有任何方法(私有/公共)可在屏幕快照发生之前进行检测,或者仅阻止屏幕快照功能.

Is there any methods (Private /Public) for detecting screenshot before it happens , or Just prevent the screenshot feature .

不要将其视为重复问题,这是iOS7特定问题

推荐答案

不,自iOS7以来没有任何变化,并且将来也不会变化,这是一个概念性问题,iOS应用无法控制设备公共功能,请考虑您在其他应用程序需要时关闭了获取屏幕截图"!这个应用程序将如何知道呢?

No, nothing has changed since iOS7 and it will not change in the future, it is a conceptual issue, iOS app doesn't has control over the device public functions, consider you turned off 'taking screenshot' while other application needs it!! How this app would know about that?

您能做的最好的事情就是使用"@QED有效答案"中提到的配置配置文件.

Best thing you can do is using Configuration Profile as mentioned @QED valid answer.

这篇关于iOS7屏幕捕获预防/检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆