I have a tableview that contains custom cells with a label. I want to change the font of this label to "Roboto-Bold". But it's not working (still the same default font). What I did so far:
- Downloaded "Roboto-Bold.ttf"
- Add the font to my project
- Modified info.plist adding: Fonts provided by application, item0 = Roboto-Bold.ttf
- Added this code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
EventOptionCell *cell = (EventOptionCell *)[tableView dequeueReusableCellWithIdentifier:@"EventOptionCell"];
switch (indexPath.row) {
case 0:
cell.optionLabel.text = @"TEST NEW FONT";
cell.optionLabel.font = [UIFont fontWithName:@"Roboto-Bold" size:20];
cell.imageView.image = [UIImage imageNamed:@"icon-test.png"];
break;
default:
break;
}
return cell;
}