Last active
October 27, 2015 20:56
-
-
Save haroldjones/26b32d11cc16bc24d7f9 to your computer and use it in GitHub Desktop.
SWIFT: Print out all the fonts available to your application
This file contains hidden or 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
import UIKit | |
class ViewController: UIViewController { | |
var stockTickerLabel: UILabel! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
for family: String in UIFont.familyNames() | |
{ | |
print("\(family)") | |
for names: String in UIFont.fontNamesForFamilyName(family) | |
{ | |
print("== \(names)") | |
} | |
} | |
} | |
override func didReceiveMemoryWarning() { | |
super.didReceiveMemoryWarning() | |
// Dispose of any resources that can be recreated. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment