Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Font in IOS Not Reflected On Device

i followed this tutorial and the custom font was shown on my storyboard but when i executed my app (on simulator or device) the font is not reflected. can anyone help. this is what i did:

1- downloaded a .ttf file and copied it to my project
2- added "Fonts Provided By Application" in info.plist and added a row having the name of my custom font.
3- opened storyboard and selected the UILabel i want to have a custom font for, and selected the font as custom then selected my font. the font was shown on the storyboard correctly.

am i missing something?

like image 684
Rashad.Z Avatar asked Sep 03 '25 14:09

Rashad.Z


1 Answers

Thank you @Andrey Chernuka and @jcaron. I solved the problem by setting the target membership to my project and then exiting the project (cleaning did not work for some reason) and reopening the project and everything was set. the font name was appearing when i printed print (UIFont.familyNames())

like image 81
Rashad.Z Avatar answered Sep 05 '25 03:09

Rashad.Z