禁止截屏付款码页面
- (void)dealloc{
//截屏通知
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationUserDidTakeScreenshotNotification object:nil];
}
-(void)takeScreenNotice{
WS(ws);
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationUserDidTakeScreenshotNotification
object:nil
queue:mainQueue
usingBlock:^(NSNotification*note) {
//截屏已经发生,可进行相关提示处理
[ws alertshowTitle:@"" andMessage:@"会员码仅用于付款,请不要发给他人" andCancelbtn:nil andSureBtn:@"知道了" CancelBlock:^{
} sureBlock:^{
}];
}];
}