iOS開發(fā)中給UIView加陰影效果或者描邊
一般做數(shù)據(jù)展示時候羊精,我們經(jīng)常給UiTableView做成卡片效果斯够,底部有層陰影效果
UIView* view=[UIView new];
view.layer.shadowColor = [UIColor lightGrayColor].CGColor;
view.layer.shadowOffset = CGSizeMake(0,0.5);
view.layer.shadowOpacity = 0.6;
view.layer.shadowRadius = 1.0;
view.clipsToBounds = NO; ```