iOS Developer

iOS投影效果

2017-01-12  本文已影响0人  magicL1

UIView的投影设置主要通过UIView的layer的相关属性来设置

阴影的颜色:imgView.layer.shadowColor = [UIColor blackColor].CGColor;

阴影的透明度:imgView.layer.shadowOpacity = 0.4f;

阴影的圆角:imgView.layer.shadowRadius = 4.0f;

阴影偏移量:imgView.layer.shadowOffset = CGSizeMake(0,0);//Defaults to (0, -3). Animatable.

上一篇下一篇

猜你喜欢

热点阅读