I'm under the impression that you can set the font for all UITextFields using the appearance protocol. When I access UITextField.Appearance, all I get access to is BackgroundColor. Am I mistaken, or is there a binding issue with the appearance protocol in MT?
Cheers,
Greg
Posts
If you look here:
http://stackoverflow.com/questions/9424112/what-properties-can-i-set-via-an-uiappearance-proxy
then run this:
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/
then
grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'
It shows your everything. UITextField has nothing....
Oh. Thanks @nicwise. I was sure I'd see some code setting font information.
Cheers,
Greg
Yeah, this is why I generally subclass UITextField to "fake" UIAppearance for it.
Doesn't work in all cases though, you'll bump into UISearchBar and other things that use UITextField internally.
@nicwise UILabelAppearance has the Font property though UILabel.h has no UI_APPEARANCE_SELECTOR, so it looks like the rule is not always right.
I also tried:
and it looks like it works good.