JiosDev
JiosDev

Reputation: 324

Change font property for label in UITableViewCell

I have a table with 10 cells. I know how to change the font, size, etc. in all cells. But I need to change the font only in the 3rd cell. How can i do this ?

Upvotes: 1

Views: 405

Answers (1)

Samiul Islam Sami
Samiul Islam Sami

Reputation: 850

You can try this

 if indexPath.row == 2 && indexPath.section == yoursection {
       cell.textLabel?.font = UIFont.systemFont(ofSize: 10)
  } else {
       cell.textLabel?.font = UIFont.boldSystemFont(ofSize: 100)
  }

Upvotes: 3

Related Questions