- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [UIColor clearColor];
UIVisualEffectView *bgView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
bgView.alpha = 0.9f;
bgView.frame = CGRectMake(0, 0, WIDTH, HEIGHT);
bgView.layer.cornerRadius = BALL_RADIUS / 2;
bgView.clipsToBounds = YES;
[self addSubview:bgView];
}
return self;
}
UIVisualEffectView实现“弹出”提示
最新推荐文章于 2021-06-07 11:20:04 发布