Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uifont 'Impact' not working for iOS

plist file

included font

I'm trying to use Impact.ttf. It is in built in OSX, but can't see it in custom fonts on xcode. So I included it in my project as shown in screens and used

UIFont *font1 = [UIFont fontWithName:@"Impact.ttf" size:50];
NSLog(@"%@",font1);
self.labelTop.font = font1;

The Log is showing null value in font1. Plz help. How to include the font.

like image 839
CalZone Avatar asked Jan 24 '26 22:01

CalZone


1 Answers

Check Target membership of the font(.ttf) files.

like image 132
user2443329 Avatar answered Jan 27 '26 11:01

user2443329



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!