I’ve figured out how to set the tint for the title bar and have set a background image for all my views, but for the life of me I cannot figure out how to set the default UILabel color for section headers and such. I don’t want to riddle my code setting all my colors to UIColor.Black by hand. Is there any way to get a list of different UIElements and the way to set defaults (colors, fonts, sizes) for each? I’m specifically interested in the color of labels, but any other information would be extremely helpful for the future.
Share
This is kind of hacky, but this does the trick, and it works with all kinds of other UI controls that subclass
UIView. This assumes you have your own subclassedDialogViewController(mine has lots of handy time-saving things in it, and all my views subclass my DVC to do work).To solve the original problem and change the text colors of all labels that are in sections, this is what you need to do:
The commented out part is what was determining if the label existed inside a section, before I decided to return an
int depthcount to see if it was on the view.EDIT: Seems as if this isn’t the perfect solution… the depth count varies for these elements. I’ll have to figure out something better in the next day or two.