iOS 设置边框,阴影,颜色,大小,圆角等
2023-09-14 本文已影响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];