Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the Font Style - (Set Lable text in All-Caps format ) in Objective C

I want to set the UILable text font style in Small-Caps format like below image.

Please give me the solution for this if anyone know,

enter image description here

Thanks. :)

like image 486
Raj Avatar asked Jan 16 '12 09:01

Raj


2 Answers

If I didn't get you wrong, is this what you want?

NSString *uppercaseString = [yourString uppercaseString];
like image 84
aslisabanci Avatar answered Oct 15 '22 03:10

aslisabanci


Fonts available in iOS don't have "capitalic style". You should add own font or try to create font using function CTFontDescriptorCreateCopyWithFeature.
I think that the simplest way will be to build attributed string (NSAttributedString) with mixed font sizes.

like image 32
Tomasz Wojtkowiak Avatar answered Oct 15 '22 03:10

Tomasz Wojtkowiak