效果图:

UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
effectView.frame = self.frame;
[self addSubview:effectView];
// 改为 lightGrayColor 效果更佳
[self setBackgroundColor:[[UIColor whiteColor] colorWithAlphaComponent:0.2f]];
网友评论