imageView添加阴影和边框-LMLPHP

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

用上这句之后流畅度大大增加: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;

05-26 06:04