-
-
Save Julioacarrettoni/f68a2d9fe2374625b428 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extend UILabel with a method which sets font, to be used by UIAppearance | |
extension UILabel | |
{ | |
func setFontName(fontName:String) | |
{ | |
self.font = UIFont(name: fontName, size: self.font.pointSize) | |
} | |
} | |
// Somewhere in the code, call the extension method on the UIAppearance proxy object of UILabel, example: | |
// | |
// UILabel.appearance().setFontName("HandelGothicBT-Regular") | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment