I'm incurred in a little problem customizing my cell;
as you can see the separator line do not reach the left border of the cell, and a I'd like to do it. I found these:
Can anyone help me to translate in swift code?
Swift 3:
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if (cell.responds(to: #selector(setter: UITableViewCell.separatorInset))) {
cell.separatorInset = UIEdgeInsets.zero
}
if (cell.responds(to: #selector(setter: UIView.preservesSuperviewLayoutMargins))) {
cell.preservesSuperviewLayoutMargins = false
}
if (cell.responds(to: #selector(setter: UIView.layoutMargins))) {
cell.layoutMargins = UIEdgeInsets.zero
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With