是否可以在UITableView中更改字体类型和大小? [英] Is it possible to change the Font type and size in UITableView?
本文介绍了是否可以在UITableView中更改字体类型和大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 UITableView
中更改字体类型和大小。例如,我如何将其设置为Tahoma?
I want to change Font type and size in UITableView
. For example, how would I set it to Tahoma?
推荐答案
cell.textLabel.font = [UIFont fontWithName:@"ArialMT" size:144];
其中 cell
是 UITableViewCell
你将在 -tableView:cellForRowAtIndexPath:
中返回。
默认情况下,Tahoma不附带iOS ,也不是没有适当的许可证,你能合法地复制它吗?但如果您不喜欢Arial,可以提供自定义的免费字体,请参阅 如何在iPhone SDK中包含和使用新字体? 。
Tahoma is not shipped with iOS by default, nor can you legally copy it without a proper license. But you could provide a custom free font if you don't like Arial, see How to include and use new fonts in iPhone SDK?.
这篇关于是否可以在UITableView中更改字体类型和大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文