投影效果
scanBtn.layer.shadowColor = [UIColorblackColor].CGColor;//shadowColor阴影颜色
    scanBtn.layer.shadowOffset = CGSizeMake(4,4);//shadowOffset阴影偏移,x向右偏移4y向下偏移4,默认(0, -3),这个跟shadowRadius配合使用
 
    scanBtn.
layer.shadowOpacity = 0.8;//阴影透明度,默认0
    scanBtn.layer.shadowRadius = 4;//阴影半径,默认3
注意: //    scanBtn.layer.masksToBounds = YES;这个为yes时没效果

相关文章:

  • 2022-12-23
  • 2021-07-31
  • 2021-09-08
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-01
  • 2021-09-12
  • 2021-10-01
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案