如何检测用户是否在 iOS 中使用 home+power 进行了屏幕截图? [英] How to detect if user did a screenshot with home+power in iOS?

查看:73
本文介绍了如何检测用户是否在 iOS 中使用 home+power 进行了屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图检测用户是否截取屏幕截图以警告他们这是一个有版权的视频.我试过达尔文通知,但它没有用......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屋!

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