Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How change size textlabel in UITableView

Tags:

uitableview

i have problem. I have dynamic tableview. So i need change text size in my textLabel. I tried:

one:

cell.textLabel.font = [UIFont systemFontOfSize:30.0f];

two:

cell.textLabel.font = [UIFont boldSystemFontOfSize:12.0];

three:

UIFont *myFont = [ UIFont fontWithName: @"Arial" size: 30.0 ];
cell.textLabel.font  = myFont;

But my textlabel not changing. So detailtextlabel - change perfectly but text label - no. What i do wrong? thanks

like image 305
Genevios Avatar asked Jun 07 '26 16:06

Genevios


1 Answers

You can try with the following..

but make sure you write this code before u setting your text

cell.textLabel.text=@"Your TEXT Goes Here";

UIFont *myFont = [ UIFont fontWithName: @"Arial" size: 18.0 ];
cell.textLabel.font  = myFont;

hope it helps.

like image 74
User 1531343 Avatar answered Jun 10 '26 23:06

User 1531343



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!