Questions tagged [uifont]

The UIFont class provides the interface for getting and setting font information. The class provides you with access to the font’s characteristics and also provides the system with access to the font’s glyph information, which is used during layout. You use font objects by passing them to methods that accept them as a parameter. Available in iOS 2.0 and later in UIKit.

The class provides access to the font’s characteristics and also provides the system with access to the font’s glyph information, which is used during layout. You use font objects by passing them to methods that accept them as a parameter.

You do not create UIFont objects using the alloc and init methods. Instead, you use class methods of UIFont to look up and retrieve the desired font object. These methods check for an existing font object with the specified characteristics and return it if it exists. Otherwise, they create a new font object based on the desired font characteristics.

Resources:

732 questions
283
votes
19 answers

How to change font of UIButton with Swift

I am trying to change the font of a UIButton using Swift... myButton.font = UIFont(name: "...", 10) However .font is deprecated and I'm not sure how to change the font otherwise. Any suggestions?
Stephen Fox
  • 14,190
  • 19
  • 48
  • 52
153
votes
19 answers

How do I set bold and italic on UILabel of iPhone/iPad?

How do I set bold and italic on UILabel of iPhone/iPad? I searched the forum but nothing helped me. Could anyone help me?
Edi
  • 1,728
  • 2
  • 13
  • 13
119
votes
7 answers

Visual List of iOS Fonts?

I am looking for a list of iOS Fonts for iOS 7. I have found the list on Apple's developer site, I am just wondering if anyone knows of a visual list where each font name is typed out in its typeface. I have seen one or two before, but the latest…
user717452
  • 33
  • 14
  • 73
  • 149
106
votes
4 answers

UIFont - how to get system thin font

UIFont has methods to get regular font (systemFontOfSize) or bold font (boldSystemFontOfSize), but how to get a "thin system font" available through storyboard? Passing "system-thin" to UIFont Contructor doesn't work, this constructor only works…
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
102
votes
15 answers

How do I get the font name from an otf or ttf file?

I have used a custom font in my previous app. The file name was "ProximaNova-Regular.otf" and to load the font I just used... [UIFont fontWithName:@"ProximaNova-Regular" size:20]; This worked perfectly. Now in this new app I have three font…
Fogmeister
  • 76,236
  • 42
  • 207
  • 306
101
votes
10 answers

What happened to "HelveticaNeue-Italic" on iOS 7.0.3

Just upgraded my iPod touch to iOS 7.0.3 and "HelveticaNeue-Italic" seems to have disappeared. When I query on the phone with: [UIFont fontNamesForFamilyName:@"Helvetica Neue"] I get the following fontNames…
Scott Sarnikowski
  • 1,461
  • 2
  • 14
  • 24
87
votes
13 answers

Custom installed font not displayed correctly in UILabel

I'm trying to use a Helvetica Neue Condensed font which I got from the Adobe Font Collection Pro Package. Unfortunately, it seems to draw incorrectly when I use it within a UILabel. The line height seems to be calculated correctly (I think), but…
MikeQ
  • 1,817
  • 3
  • 19
  • 27
70
votes
6 answers

UIFont fontWithName font name

Say you want a specific font for UIFont. How do you know what it's called? E.g. if you wanted to use this code: [someUILabelObject setFont:[UIFont fontWithName:@"American Typewriter" size:18]]; From where do you copy the exact phrase "American…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
66
votes
6 answers

make UILabel's text bold

I want to make UILabel's text bold infoLabel=[[UILabel alloc]initWithFrame:CGRectMake(90,150, 200, 30)]; [infoLabel setText:@"Drag 14 more Flavors"]; [infoLabel setBackgroundColor:[UIColor clearColor]]; [infoLabel setFont:[UIFont…
Ali
  • 10,774
  • 10
  • 56
  • 83
63
votes
3 answers

How to detect Dynamic Font size changes from iOS Settings?

Inside settings->general->text size, after changing the text size, I'd have to exit my own app to have the sizes applied to [UIFont preferredFontForTextStyle:..] Is there a delegate or notification to notify my app to re-apply the new…
mskw
  • 10,063
  • 9
  • 42
  • 64
57
votes
11 answers

Setting BOLD font on iOS UILabel

I have assigned a custom font of 'Helvetica' with size 14 already for the text in UILabel using Interface Builder. I am using reusing the same label at multiple places, but at some place I have to display the text in bold. Is there any way I can…
tech_human
  • 6,592
  • 16
  • 65
  • 107
54
votes
5 answers

How do you stylize a font in Swift?

I'm trying out developing for Swift, it's going pretty well. One of the issues I'm having is finding out how to stylize fonts programmatically in the language. For example in this label I wrote the code below for, how can I make it Helvetica Neue…
user3763693
  • 1,375
  • 3
  • 12
  • 11
51
votes
19 answers

Change the font size of UISearchBar

How can I change the font size of UISearchBar ?
pankaj
  • 7,878
  • 16
  • 69
  • 115
50
votes
5 answers

What exactly is UIFont's point size?

I am struggling to understand exactly what the point size in UIFont means. It's not pixels and it doesn't appear to be the standard definition of point which is that they relate to 1/72th inch. I worked out the pixel size using -[NSString…
mattjgalloway
  • 34,792
  • 12
  • 100
  • 110
48
votes
8 answers

Change font of back navigation bar button

I want to be able to set the font of my apps navigation bar back button without doing anything too crazy and without losing any other design characteristics of the button (i.e. I want to keep the arrow). Right now I use this in viewDidAppear: to set…
zachjs
  • 1,738
  • 1
  • 11
  • 22
1
2 3
48 49