我也找到源码了,不过还是谢谢
UIBlurEffect *makeCustomZoomBlurEffectImpl(bool isLight) {
if (@available(iOS 13.0, *)) {
if (isLight) {
return [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemUltraThinMaterialLight];
} else {
return [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemUltraThinMaterialDark];
}
} else if (@available(iOS 11.0, *)) {
NSString *string = [@[@"_", @"UI", @"Custom", @"BlurEffect"] componentsJoinedByString:@""];
CustomBlurEffect *result = (CustomBlurEffect *)[NSClassFromString(string) effectWithStyle:0];
setField(result, encodeText(@"tfuCmvsSbejvt;", -1), 10.0);
//setField(result, encodeText(@"tfu[ppn;", -1), 0.015);
setNilField(result, encodeText(@"tfuDpmpsUjou;", -1));
setField(result, encodeText(@"tfuDpmpsUjouBmqib;", -1), 0.0);
setField(result, encodeText(@"tfuEbslfojohUjouBmqib;", -1), 0.0);
setField(result, encodeText(@"tfuHsbztdbmfUjouBmqib;", -1), 0.0);
setField(result, encodeText(@"tfuTbuvsbujpoEfmubGbdups;", -1), 1.0);
if ([UIScreen mainScreen].scale > 2.5f) {
setField(result, encodeText(@"setScale:", 0), 0.3);
} else {
setField(result, encodeText(@"setScale:", 0), 0.5);
}
return result;
} else {
return [UIBlurEffect effectWithStyle:UIBlurEffectStyleRegular];
}
}
😄
iOS基础模糊,UICustomBlurEffect实现自定义模糊效果说在前面 前段时间项目中用到了模糊效果,我发现系统提供的UIBlurEffect模糊效果不能调整参数。在网上也看了很多大佬的文章,其中大部分都是传入一张图片,再将图片模糊处理...