Reputation: 237
How I can set the color of separator of sections? I set all posible colors to "f5f5f5", but the separator is "ededed". Why it can be?
Upvotes: 0
Views: 2105
Reputation: 1112
Objective c
- (void)viewDidLoad
{
[self.tableView setSeparatorColor:[UIColor redColor]];
}
Swift
func viewDidLoad()
{
self.tableview.separatorColor = UIColor.redColor
}
Upvotes: 1
Reputation: 139
To change color of Separator:
self.tableview.separatorColor = UIColor.redColor
I hope it helps!
Upvotes: 0
Reputation: 1191
You can create an Extension to set a Shadow in your UITableVIewCell
extension UIView {
public func applyShadow(
withOpacity opacity: Float = 0.4,
offset: CGSize = CGSizeMake(2.0, 0.5),
radius: CGFloat = 3.0) -> Void {
self.layer.shadowOpacity = opacity
self.layer.shadowOffset = offset
self.layer.shadowRadius = radius
}
You can use this extension. cell.applyShadow()
Upvotes: 0