I am trying to use a font which is not a system font in the bottom way
[pickerLabelLeft setFont:[UIFont fontWithName:@"DaxOT-Bold" size:20]];
[pickerLabelLeft setFont:[UIFont fontWithName:@"Dax OT-Bold" size:20]];
[pickerLabelLeft setFont:[UIFont fontWithName:@"Dax-OT-Bold" size:20]];
But none of these is working.
But if i use like below then it can altleast get the system font with size
[pickerLabelLeft setFont:[UIFont boldSystemFontOfSize:20]];
Can anyone help me?
Check out this short tutorial on how to use custom fonts.
It’s important to understand that the file name of the font (e.g. DaxOTBold.ttf) and the actual name of the font are 2 different things. Most of the time they are the same but there are some fonts that have a name that is slightly different from the file name. For example “Arial Rounded Bold.ttf” has the actual name “Arial Rounded MT Bold”. Make sure that you are using the correct name.
In this example in the plist you would use “Arial Rounded Bold.ttf” and in your code you’d use [UIFont fontwithName:@”Arial Rounded MT Bold” size:20]