i want to use a custom font for my application. i added font file to my app and the in info.plist i added a new row Fonts Provided By Application as an array and added my font OpenSansBold.ttf. and the font file can be seen in Build Phases also. In the table view cell i want to use that font so i wrote this.
but it cant be seen in the right font format. how can i change the label's font here ?
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellID = @"HaberCell";
HaberCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil)
{
cell = [[HaberCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
}
Haber *currentHaber = [self.arrHaberler objectAtIndex:indexPath.row];
cell.haberLbl.text = currentHaber.haberTitle;
cell.haberLbl.font = [UIFont fontWithName:@"OpenSansBold" size:12];
return cell;
}
but it cant be seen in the right font format. how can i change the label's font here ?
Last edited: