当应用进入后台时,系统会自动在当前应用的页面截屏并存储到手机内,如果当前页面涉及敏感信息时,被攻击会造成泄密。如下图生成的两张图片路径:
防止造成信息泄露 - 添加高斯模糊(参考支付宝挂起时的模糊效果)
实现方案:
在applicationWillResignActive中添加模糊视图
- (BlurView *)backgroundBar{
if (!_backgroundBar) {
_backgroundBar = [[BlurView alloc] initWithFrame:[UIScreen mainScreen].bounds];
}
return _backgroundBar;
}
- (void)applicationWillResignActive:(UIApplication *)application {
__weak typeof(self)weakSelf = self;
dispatch_async(dispatch_get_main_queue(), ^{
for (UIWindow *window in [UIApplication s