如何检测用户是否在 iOS 中使用 home+power 进行了屏幕截图? [英] How to detect if user did a screenshot with home+power in iOS?
问题描述
我试图检测用户是否截取屏幕截图以警告他们这是一个有版权的视频.我试过达尔文通知,但它没有用......NSMetadataQuery 可能是一个解决方案,但我们希望应用程序也能在 iOS4 上运行.有人可以帮助我吗?谢谢!:p
I'm trying to detect if user take a screenshot in order to warn them this is a video with copyright. I've tried Darwin Notification, but it didn't work... NSMetadataQuery might be a solution, but we want the app to run on iOS4 as well. Can somebody help me? Thanks!:p
推荐答案
无法检测到已(或将)在 iOS 5 上截取的屏幕截图.
在 iOS 4.0 中,有一个 Darwin 通知被触发 PictureWasTakenNotification
,但现在没有了.
In iOS 4.0, there was a Darwin notification fired PictureWasTakenNotification
, but not anymore.
文档没有提及任何内容,使用NSNotificationCenter
订阅所有通知只会在截屏后显示静音.
The documentation does not mention anything, and using NSNotificationCenter
to subscribe to all notifications only shows silence after taking a screenshot.
这篇关于如何检测用户是否在 iOS 中使用 home+power 进行了屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!