native调用ios 截屏通知 截屏后崩溃退出APP
var NSNotificationCenter=null;
var delegate=null;
NSNotificationCenter = plus.ios.importClass("NSNotificationCenter");
var nc = NSNotificationCenter.defaultCenter();
if(delegate!=null){
nc.removeObservernameobject(delegate,"UIApplicationUserDidTakeScreenshotNotification",null);
}
delegate = plus.ios.implements("NSObject",{"userDidTakeScreenshot:":userDidTakeScreenshot});
nc.addObserverselectornameobject(delegate,
plus.ios.newObject("@selector","userDidTakeScreenshot:"),
"UIApplicationUserDidTakeScreenshotNotification",
null);
4***@qq.com
- 发布:2019-02-19 16:22
- 更新:2022-09-18 17:43
- 阅读:1148
1 个回复
大帅锅
你好,请问你那边解决了吗,我这边也是直接崩溃了。iOS15.0上面的