当应用进入后台,或从iOS多任务中心选择APP时,为APP覆盖上毛玻璃层,保护用户隐私
Show blur layer when your app is in iOS multitask center
-
将
ImageBlur文件夹拖入你的项目中Drag
ImageBlurFolder to your project. -
在
Appdelegate.h文件中#import "BlurBackground.h"Add
#import "BlurBackground.h"toAppdelegate.h.
-
在
applicationWillResignActive方法中,调用addBluredBackground:(UIWindow *)window即可添加毛玻璃层Call
addBluredBackground:(UIWindow *)windowmethod inapplicationWillResignActiveto show blur layer. -
在
applicationDidBecomeActive方法中,调用removeBluredBackground即可移除毛玻璃层Call
removeBluredBackground method inapplicationDidBecomeActive` to remove blur layer.
具体细节参考Demo
For more details,view the Demo code.
