UITableViewCellReorderControl color on clear background - ios

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?

Related

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).

UITableView cell borders bleed through

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?

How to get default gray color of UISearchBar

My layout places the UISearchController's search bar as a subview of my table view header, alongside other custom controls (buttons, etc.).
In order to make all the controls inside the header view to "blend in", I want to set the header view's background color to match that of the search bar (that is, the outer rim's light gray, not the input textfield's white).
I've tried querying both the search bar's backgroundColor and barTintColor propErties in viewDidLoad(), but both return nil, and my header view ends up white.
I could hard code the color (ColorPicker reports it to be RGB (199, 199, 204), at least on the Simulator), but that's not an elegant solution and will break one day when Apple changes the appearance.
The background for the search bar is actually an image so you cannot retrieve it's background color. However, if you just want it to blend in then you can change the imageView to be transparent and set the background color to anything you wish. The UIImageView was found to be here using the view debugger in Xcode.
In Swift 2.0
(searchBar.subviews[0].subviews[0] as! UIImageView).alpha = 0

Create swipe to reveal buttons for iOS 7, using clear color for background

I followed this tutorial http://www.teehanlax.com/blog/reproducing-the-ios-7-mail-apps-interface/ to add more button beside delete button when swiping.
But the problem is the cell need to use clear color so the background image can be seen. But that approach used scrollview to display the content view and the buttons view of tableview cell. If the content view of the scrollview has any background color instead of clear color, it can hide the buttons so these buttons only display a part determined by our finger when swiping on the cell, using clear color for background makes these buttons show without the need to swipe from right to left on the cell.
So anyone can give me a suggestion to use the clear color to display the background image without revealing the under buttons?
You can use MGSwipeTableCell class for creating swipeable buttons with any colour you need. It will not interfere with the tableview cell color as well. It is very easy and quick to implement.
https://github.com/MortimerGoro/MGSwipeTableCell

Titanium TableViewRow removes background color of subview when selected

I have a custom TableViewRow with a subview for an image. The imageView is inside a container so I can display the image as a square. The container has a white background and the image may not fill the container view. I removed the image from the container to explain the problem better. Please see the images below.
As you can see, when the bottom row is selected the background of the white square disappears. In my case, when the image is inside the container, the white color that fills the square is removed and I have a square border with a smaller image inside it.
Has anyone dealt with this before?
Thanks.
This is normal behavior for any table -- it changes the background color of all the subviews so it can show the selection highlight.
See this question for more details and work-arounds.
my suggestion here is to handle the selectionHighlighting yourself so you can manage how the views are rendered.
Once a row is selected, create you own method to set the background color of the individual views to give the visual experience you want. Remember to set the tableView so there is not highlighting on selection

Resources