UITableView cell borders bleed through - ios

I have two groups of cells, we'll call them header cells and body cells. I will always have 4 or less header cells, and 1 or more body cells. The header cells have a colored background (all the same background) and the body cells are all white. The problem is that when I scroll the tableView background color "bleeds through" between cells. This is not a cell divider. The image I attached shows what happens when I set the color to the green that's in the header.
I tried using clearColor for the background, but that shows a black line between all cells, which is not good. So far, we've just given the tableView a white background, since the majority of the cells are white it would be less noticible.
I also tried setting the tableView background color in the cellForRow, depending on the section, but that just causes it to switch what color is popping up, as I thought it would.
How can I get rid of the line that come through when scrolling when the cell background color is different than the tableView background color?

Related

Clear TableHeader with ImageView turning white while scrolling [Swift]

Small question when I scroll the tableView, the background color of the header changes to white. I thinks it's a problem with _UIVisualEffectBackdropView, but I didn't know how to resolve that
Without scrolling tableView
When I scroll the tableView

Swift - Empty space when dragging down CollectionView Header

I'm currently building a collection view with a header, I've got all the pieces working, so I don't necessarily have a question/problem about code, header works fine and so do the cells. My question is about the header and when you drag it down, you can see the background color. Currently, I have my header's color set to Gray, and the background color of the controller is set to white, so when I drag the header down, I can see the white background.
My question is.. what code do I need to implement in order for the gray header to be continuously stuck to the top even as I drag the header down?
I'd like to figure how to implement this because I want to keep the spacing of my collection view cells white and not gray (If I were to change the background color to gray).

TableView Cell background on edit not working

I have a tableview with a transparent background, and a content offset to allow part of a background image to be visible at the top of the first cell. The content offset is set with: accordianTableView.contentInset = UIEdgeInsetsMake(100, 0, 0, 0)
As shown in the following image, the green highlighted rectangle is the first cell of the tableview, which has a solid white background. The cell is in edit mode, but there is a transparent section when the cell is dragged to the right, where the background image is visible through the cell even though it has a white background...
I cannot have the background of the table view solid white, since this would cause the background image to be totally invisible through the table view.
How can I make the entire cell background always white, even when dragged to the right while editing?
Worked around the issue by adding an empty UIView behind the tableview, and changing its position to always be behind the tableview - providing a background color for the cells while in edit mode.

Tableview gets black while data loads from the server

hello I have tableview in which I am populating data from the web service. I am showing activity indicator first on the tableview until data comes from the server. The problem is while spinner is moving table gets black until data comes up and table moves to white color like I designed. But Before that it shows separator lines and black background for like 2 sec. How can I show complete white background with the spinner and also with no separator lines like in many apps.
The black background is most likely the background color of your tableView, because before populating the tableView your reusable cells don't exist in the view. If your tableView has a transparent background the black color is due to the color of the background of your view.
If you want to get rid of the separators just for the loading, I suggest creating a tableFooterView and removing it when populating the tableView.
Not sure what causes the black color from your comment but you can disable separator lines as such:
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone

UITableViewCellReorderControl color on clear background

I have a UITableView with transparent background and I also made UITableViewCells background transparent. I have UITableViewCellReorderControl on the cells as I support reordering of cells.
It is ok in black background but when I set the holder view controller's background to white, I need UITableViewCellReorderControl to draw in a dark color.
It can't be just me and It shouldn't require iterating through lots of subviews (as seen on similar questions on stackoverflow.)
I do not need to customize the UITableViewCellReorderControl itself; I don't want to change the image.
Is there anything to do this other than iterating views to replace the image with a custom one?

Resources