In my UITableView, I am setting my separators like this:
self.tableView.clipsToBounds = true
self.tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine
self.tableView.separatorColor = UIColor(hex: 0xededed)
self.tableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0)
self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0)
self.tableView.layoutMargins = UIEdgeInsetsZero
And my cells are like this:
override func awakeFromNib() {
super.awakeFromNib()
self.layoutMargins = UIEdgeInsetsZero
self.contentView.layer.borderWidth = 0.0
self.layer.borderWidth = 0.0
}
This allows me to have edge-to-edge separators:
I'm trying to create a "down caret" for some of my cells (some cells will have it, some won't). If a cell has it, it will cover the top left portion of the separator, like this:
Notice the caret at the top left of each cell.
What's the best way to achieve this? Maybe use an image and cover the separator? Or should the caret be drawn by code?