Subscribe ( )

iPhone Programming Tutorials

 

Forum

You must be logged in to post Login Register

Search 

changing a UILabel font crashes

User Post

7:08 pm
February 10, 2009


rgaino

Noob

posts 1

1

I am trying to write a line of code that changes the font on a UILabel like this:

labelDescription.font = [UIFont fontWithName:@"Baskerville" size:12.0];


But this line crashes with the exception:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: font != nil'


This same line of code works if I use the font name as Helvetica or Arial, but not Baskervillem which is a font that shows up when I command-T on Interface Builder.

I don't necessarily have to do this programatically, I could just set it on Interface Builder, but I don't believe that is possible, is it?

Any help here?


About the iCodeBlog forum

Currently Online:

6 Guests

Maximum Online: 44

Forums:

Groups: 2

Forums: 6

Topics: 332

Posts: 778

Members:

There are 744 members

There are 1 guests


Brandon has made 87 posts

Top Posters:

bobcubsfan - 54

crazyiez - 30

VertigoSol - 26

AdeC - 17

Uhu - 17

Administrator: Brandon | Moderators: VertigoSol


© - Version 3.1.4 (Build 357)