Objective c
- (void)viewDidLoad
{
[self.tableView setSeparatorColor:[UIColor redColor]];
}
Swift
func viewDidLoad()
{
self.tableview.separatorColor = UIColor.redColor
}
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()
To change color of Separator:
self.tableview.separatorColor = UIColor.redColor
I hope it helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.