imageView添加阴影和边框

 

注意:大量设置阴影会造成卡顿!!!

用上这句之后流畅度大大增加:imageV.layer.shouldRasterize = YES;

例:

        // 设置阴影

        imageV.layer.shadowOffset = CGSizeMake(4, 0);

        imageV.layer.shadowColor = [UIColor blackColor].CGColor;

        imageV.layer.shadowOpacity = 0.6;

        imageV.layer.shadowRadius = 3;

        imageV.layer.shouldRasterize = YES;

相关文章:

  • 2021-11-08
  • 2021-12-26
  • 2022-12-23
  • 2021-12-26
  • 2021-12-26
  • 2021-12-26
猜你喜欢
  • 2021-12-26
  • 2022-02-15
  • 2021-12-13
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案