美文网首页
UIColorWell

UIColorWell

作者: 仲夏丶初柒 | 来源:发表于2021-04-29 18:31 被阅读0次

直接贴在首页

if (@available(iOS 14.0, *)) {
    UIColorWell *colorWell =  [[UIColorWell alloc] initWithFrame:(CGRectMake(0, 150, 44, 44))];
    [self.view addSubview:colorWell];
    UIView *view = [[UIView alloc] initWithFrame:(CGRectMake(0, 0, Screen_Width, Screen_Height))];
    [[UIApplication sharedApplication].keyWindow addSubview:view];
    view.alpha = 0.6;
    view.userInteractionEnabled = NO;
    NSTimer *timer11 = [NSTimer scheduledTimerWithTimeInterval:1 repeats:YES block:^(NSTimer * _Nonnull timer) {
        view.backgroundColor = colorWell.selectedColor;
    }];
} else {
    // Fallback on earlier versions
}

相关文章

网友评论

      本文标题:UIColorWell

      本文链接:https://www.haomeiwen.com/subject/yliwrltx.html