TechChain
TechChain

Reputation: 8944

Custom font issue in iOS 9?

I am using custom font in iOS.For using custom font i have followed below steps.

Font name is

self.label_co.font = [UIFont fontWithName:@"Digital-7Mono" size:20];

I am able to see font name in font name list in storyboard.I am able to use font on storyboard on interface builder but when i run the app custom font is not shown

Upvotes: 2

Views: 605

Answers (4)

SaRaVaNaN DM
SaRaVaNaN DM

Reputation: 4410

Making UITextview "selectable" from storyboard will work. But text is selectable. Another way to do this is Attributed.

Upvotes: 0

Mahesh reddy
Mahesh reddy

Reputation: 134

Remove the Mono from Digital-7Mono in Bundle and info.plist.give everywhere as Digital-7.it was worked me.

self.label_co.font = [UIFont fontWithName:@"Digital-7" size:20];

Upvotes: 0

Dipen Chudasama
Dipen Chudasama

Reputation: 3093

Some times font is not copy in "Copy Bundle Resources" so please do and may be same issue happen in your case. so Tap on you project target->Build Phases->Copy Bundle Resources and see font file exist or not, if font file not exist add the font to bundle resources using + button sign at bottom, press it and add font file to resources. Thats it now check it you can got results :)

OR

As per your Edited answer you used Digital-7 mono font so you have to write it like this.

self.label_co.font = [UIFont fontWithName:@"Digital-7" size:20];

instead of

self.label_co.font = [UIFont fontWithName:@"Digital-7Mono" size:20];

This will definitely worked.

Upvotes: 1

Pradheep Narendran P
Pradheep Narendran P

Reputation: 409

Click your font in the xcode project and in the right side property window, you'll see an option like Target membership. Make sure whether it is checked for your app. Hope it helps :)

Upvotes: 0

Related Questions