全局监听截屏事件

2018-04-25  本文已影响0人  simplez_

iOS7之后,苹果开放出一个通知:UIApplicationUserDidTakeScreenshotNotification,截屏时系统就会发出这个通知,需要你注册这个通知,就能捕捉到截屏图片。

//注册截屏通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(GetScreenShotAction:) name:UIApplicationUserDidTakeScreenshotNotification object:nil];

方法实现:

获取截屏图片data:

上一篇 下一篇

猜你喜欢

热点阅读