UITableCell Font Size (In Swift)

Swift 5

cell.textLabel?.font = UIFont.systemFont(ofSize: 30.0)

Swift Answer:


If you want the font to adjust and fit to the width of the cell. I used this when I had an accessory view.

cell.textLabel?.adjustsFontSizeToFitWidth = true

I recently played around with font sizes and noticed that nothing get's displayed when the font size is smaller than 11.

According to the Apple iOS Human Interface Guidelines:

Text should never be smaller than 11 points, even when the user chooses the extra-small text size.

Just a thought...