I want to set the custom font to UILabel in storyboard. I have .ttf file of font. I searched about it on google, everybody is setting the font programmatically.
Asked
Active
Viewed 5,028 times
3 Answers
7
Select the control (label) and add User Defined Runtime Attribute (Key Path set to fontName , Type set to String and Value set to the name of your custom font).
Note:
Make sure that you've added the font to the project - tutorial

Community
- 1
- 1

Shamsudheen TK
- 30,739
- 9
- 69
- 102
-
Thank you.. Partially solved my problem. I referred this link to solve my problem. http://stackoverflow.com/questions/9090745/custom-font-in-a-storyboard/15155081#15155081 – Rakesh Aug 21 '14 at 11:34
1
The good news is that this is a new feature added to the Interface Builder in Xcode 6 as documented here

John Keyes
- 5,479
- 1
- 29
- 48

Mike Pollard
- 10,195
- 2
- 37
- 46
-
@pawan you need to be logged into developer.apple.com with your developer account – Mike Pollard Aug 21 '14 at 12:50
1
Connect Your IBOutlet to Label and you can set like this,
lblHeading.font = [UIFont fontWithName:@"ApexNew-Bold" size:17];
in the above code ApexNew-Bold is custom font and you need to add it in Plistfile.

Balu
- 8,470
- 2
- 24
- 41