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设置背景色,否则无效果。