iOS code generates shadow border

As shown in the picture

  • Diffuse shadows around

 the code

    self.bg2.layer.shadowColor = color.CGColor;
    self.bg2.layer.shadowOffset = CGSizeMake(0,8);//阴影扩散范围
    self.bg2.layer.shadowOpacity = 1.0;
    self.bg2.layer.shadowRadius = 29;
    self.bg2.layer.cornerRadius = 25;

    self.bg2.backgroundColor = [UIColor whiteColor];
    self.bg2.clipsToBounds = NO;

Guess you like

Origin blog.csdn.net/hezhi66327/article/details/128627093