I'd like to set the accessory view icon to be white, similarly to how icons are colored white automatically in a black TabBar, but it's not immediately obvious to me how to do this. Does anyone have experience with this?
You cant change its color by by simply specifying its UIColor. You can customize Disclosure Indicator by adding one image for normal state and another for selected (highlighted).
Actually the correct answer (despite it being so late) is to set your cell tintColor property to a white UIColor
object, like so:
UITableViewCell *cell = [UITableViewCell new]; // or other instantiation... [cell setTintColor:[UIColor whiteColor]];
Subclassing the accessory view entirely is also possible, but the question is asking to make the cell accessory button white, so this should be the correct answer (at least for iOS7).
Note: Corrected property name, also note that it doesn't actually work for the indicator accessory type
Your best bet is to make an image that you want to put in there and then setting the accessory view to be that image. Here’s Apple's Official Documentation for UITableViewCells.
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