[alertSquare.layer setShadowColor:[UIColor blackColor].CGColor]; //阴影的不透明属性0.0-1.0,默认值为0(完全透明,没有阴影效果) [alertSquare.layer setShadowOpacity:0.4]; //设置阴影半径 [alertSquare.layer setShadowRadius:20.0f]; //设置阴影偏移量 [alertSquare.layer setShadowOffset:CGSizeMake(0.0, 0.0)];
为视图设置阴影
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.