美文网首页
iOS 设置边框,阴影,颜色,大小,圆角等

iOS 设置边框,阴影,颜色,大小,圆角等

作者: 一代枭雄 | 来源:发表于2023-09-14 11:48 被阅读0次

    -(void)setViewBorderShadow:(UIView*)shadowview{

        shadowview.backgroundColor = [UIColor colorWithRed:44/255.0 green:21/255.0 blue:111/255.0 alpha:1.0];

        shadowview.layer.shadowColor=  [UIColor colorWithRed:76/255.0 green:72/255.0 blue:255/255.0 alpha:1.0].CGColor;

        shadowview.layer.borderWidth=1.0;

        shadowview.layer.shadowOffset = CGSizeZero;

        shadowview.layer.shadowOpacity=1;

        shadowview.layer.shadowRadius=4;

        shadowview.layer.borderColor =[UIColor colorWithRed:154/255.0 green:138/255.0 blue:255/255.0 alpha:1.0].CGColor;

        shadowview.layer.cornerRadius=15;

    }

    [self setViewBorderShadow:self.youView];

    相关文章

      网友评论

          本文标题:iOS 设置边框,阴影,颜色,大小,圆角等

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