how to make text bold for detailedTextLabel in swift

Raj picture Raj · Jul 30, 2015 · Viewed 8.3k times · Source
cell!.textLabel?.text = vehicle["vrn"].string
cell?.detailTextLabel?.text = stateString

I want to display stateString as bold and also tried to use textLabel instead of detailedText but it did not work.

Answer

pbush25 picture pbush25 · Jul 30, 2015

You can set the font property of the detailTextLabellike so:

cell.detailTextLabel?.font = UIFont.boldSystemFontOfSize(15.0)