Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(iPhone)How to change font size of a row in tableview

Hi I am now working on changing font size of a row. There seem to be no such settings in inspector. And I dont know which delegate method to override. Thx for your help :)

like image 830
Yongzhi Avatar asked Nov 19 '10 04:11

Yongzhi


People also ask

How to change the font size on my iPhone?

Change the font size on your iPhone, iPad, and iPod touch Change the font size. Go to Settings > Display & Brightness, then select Text Size. Drag the slider to select the font... Make the font even bigger. Go to Settings > Accessibility, then select Display & Text Size. Tap Larger Text for ...

How to make the text bigger on my iPhone?

How to Make the Text Bigger on My iPhone 1 Go to Settings > Accessibility, then select Display & Text Size. 2 Tap Larger Text for larger font options. 3 Drag the slider to select the font size you want. See More....

How do I change the size of text on my screen?

Go to Settings > Display & Brightness, then select Text Size. Drag the slider to select the font size you want. Go to Settings > Accessibility, then select Display & Text Size. Tap Larger Text for larger font options.

How do I change the size of the font in outlook?

You can change the size of your font in Mail, Contacts, Calendar, Phone, Notes, and other apps that support Dynamic Type. Go to Settings > Display & Brightness, then select Text Size. Drag the slider to select the font size you want. Go to Settings > Accessibility, then select Display & Text Size. Tap Larger Text for larger font options.


2 Answers

Try something like this in your cellForRowAtIndexPath method:

//Configure the cell...
cell.textLabel.font = [UIFont systemFontOfSize:14]; //Change this value to adjust size
cell.textLabel.numberOfLines = 2; //Change this value to show more or less lines.
cell.textLabel.text = @"This is my text";
like image 127
jocull Avatar answered Nov 14 '22 22:11

jocull


//font size
cell.textLabel.font = [UIFont systemFontOfSize:14];
like image 37
Bhavesh Nayi Avatar answered Nov 15 '22 00:11

Bhavesh Nayi