Reputation: 662
I'm not able to change the textLabel's font in UITableViewCell
. This line doesn't work with iOS 8 SDK : [cell.textLabel setFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:16.5]];
Can anyone give help me ?
EDIT : My app run with iOS7. I want to test it with iOS8. Only this line of code doesn't work.
Upvotes: 2
Views: 1546
Reputation: 662
I find the solution. This line:
[cell.textLabel setFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:16.5]];
change to this line :
[[cell textLabel] setFont:[UIFont fontWithName:@"HelveticaNeue-Light" size: 16.5]];
This is the only change I made in my code.
Upvotes: 4
Reputation: 71
I had the same problem and was able to resolve it. try opening your ttf file in the font book application and validate it. if you get a red X in one of the validation steps that might be the issue. I replaced the ttf with a file from a different font and the problem was resolved.
Upvotes: 0
Reputation: 40
I'm not familiar with xCode6, but you should check if the file is set to objective-c.
Upvotes: 0