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?

Search 

About the iCodeBlog forum

Most Users Ever Online:

44


Currently Online:

6 Guests

Forum Stats:

Groups: 2

Forums: 6

Topics: 419

Posts: 893

Membership:

There are 934 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

bobcubsfan – 54

crazyiez – 30

Uhu – 17

AdeC – 17

Nick – 15

jitesh61 – 12

Administrators: Brandon (88 Posts), Collin (0 Posts)

Moderators: VertigoSol (26 Posts)



©   

  • Posted by on 6 Aug 2008 in Uncategorized
  •   |  
  •   |  
  •   |  
  • Comments Off

Comments are closed.