改变显示工具栏菜单的字体大小对于下面的图片:从编程迅速
如何增加字体大小?
这是BackTableVC.swift
代码:
import Foundation
class BackTableVC: UITableViewController {
var tableArray = [String]()
override func viewDidLoad() {
tableArray = ["event log", "my details", "research", "share", "checklists", "templates", "helpful links", "feedback"]
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return tableArray.count;
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: tableArray[indexPath.row], for: indexPath) as UITableViewCell
cell.textLabel?.text = tableArray[indexPath.row]
cell.textLabel?.textColor = UIColor.white
return cell
}
如何增加字体大小?有任何想法吗?
http://stackoverflow.com/questions/7957215/how-can-i-change-the-font-size-of-my-uitableview-cell-title –
您可以直接使用此cell.textLabel.font = UIFont(name:“Avenir-Book”,size:15.0) – Aditya
将'cell.textLabel?.font = [UIFont systemFontOfSize:16.0];'添加到'tableView'函数中。您可以将16.0更改为任何其他您喜欢的字体大小。 – SimpleBeat