I've made view with storyboard
, using UITableView
with subtitle style cell
. On simulator my cells looks fine - header is Bold
, and subtitle greyed
with smaller font size. However on device(iphone4), everything looks like with same font, and no Bold
title. Is there something that i'm missing?
Issue solved by compilling and running project on xcode 4 instead of xcode 5 DP. I've tried to create custom cell, but that didnt work aswell
I'm personally using a bolded font for bold characters, I'm no longer using weight for specify if it should display in bold.
What I mean is... if you want your text bold, use the font "Arial-BoldMT" instead of "Arial" that you will bold with parameters.
try the below code:
UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 200, 20)];
label.text = @"Hello";
label.font = [UIFont fontWithName:@"Helvetica-Bold" size:12.0];
[cell.contentView addSubview:label];
UILabel* label1 = [[UILabel alloc] initWithFrame:CGRectMake(5, 25, 200, 20)];
label1.text = @"Whats Up?";
label1.font = [UIFont fontWithName:@"Helvetica-Bold" size:10.0];
[cell.contentView addSubview:label1];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.