I want to remove certain UITableViewCell separators (not all of them).
I see them in the UI, but don't understand why they don't get listed when I print out the subview hierarchy?
for view in cell.subviews {
DDLogDebug(String(describing: type(of: view)))
}
This seems to happen upon initial view. If I scroll the UITableView cells far out of view and then back again, the UITableViewCell's separator magically appears in the subview log printout. What's going on here?
note: I've only tested on the simulator as I don't own an iPhone X currently.


Working with UITableViewCell's outside of the cell doesn't seem as reliable as simply subclassing the cell and taking control from within it.
Hence my solution below:
Using this method allows me to find the
SeparatorViewevery time and be able to remove it.