I'm trying to initially survey (log) all the fonts and font sizes I use in my app, fonts / sizes, that could be set programmatically or in nib files. Afterwards, I hope to use the code to set fonts too.
(I am aware of font type dynamics, however I'm have auto layout issues.)
I've got so far (see below), but ideally I'd like to just find anything with a font, I mean it could be a navigation bar not just buttons, labels or textfields.
Maybe I could somehow check to so see if the font method was a available ?
NSArray* buttonsArray = currentView.subviews;
for((UIButton*) button in buttonsArray)
{
button.titleLabel.font = [UIFont fontWithName:@"myCustomFont" size:16];
}
You can check if an object responds to -font by sending it the -respondsToSelector: message, like this: