您的位置:首页 > 其它

给tableview cell添加阴影:

2016-03-25 12:08 281 查看
cell.layer.shadowOffset =CGSizeMake(0, 1);

cell.layer.shadowColor = [UIColorgrayColor].CGColor;

cell.layer.shadowRadius = 1;

cell.layer.shadowOpacity = .5f;

CGRect shadowFrame = cell.layer.bounds;

CGPathRef shadowPath = [UIBezierPath bezierPathWithRect:shadowFrame].CGPath; cell.layer.shadowPath
= shadowPath;

注意:不要给section footer 或 section header设置背景色,否则无效果。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: