6

Same as this question, but for an OSX app, rather than an iOS app.

UIKit and, therefore, UILabel don't appear to be available for non-iOS apps...

Is there a way to do something similar to

[[UILabel appearance] setFont:[UIFont fontWithName:@"YourFontName" size:17.0]];

that will work in an OSX app? Or if I could set a default/global font & color via Xcode, rather than programmatically, that would be great too.

Community
  • 1
  • 1
Troy
  • 21,172
  • 20
  • 74
  • 103
  • What do you use for displaying text in OSX? As far as I know, `UILabel` is not available, and I assume you are using `NSTextView`, or `NSText`? – Yuchen Feb 22 '15 at 21:20
  • NSTextField ("Label") – Troy Feb 22 '15 at 23:51
  • Good question actually! You should probably put `NSTextField` in the question description as well. – Yuchen Feb 22 '15 at 23:57
  • I can suggest one workaround for this issue. You can write an extension to the Label class and in the awakeFromNib you can assign your desired font and color. – Sheen Vempeny Feb 24 '15 at 06:27

0 Answers0