0

I am working on a app and i have a main table view. By default in iPhone if a cell is on focus its font color changes to white. I used this code to set the font of my cell:

lblTemp.font = [UIFont boldSystemFontOfSize:18];
lblTemp.backgroundColor = [UIColor clearColor];

When a cell is on focus its text color doesn't change to white. it remains black. how can i change a text's color oc a cell to white when its on focus. Thanx

Adnan
  • 25,882
  • 18
  • 81
  • 110
Piscean
  • 3,069
  • 12
  • 47
  • 96

1 Answers1

1

Try to set highlightedTextColor property to your label:

lblTemp.highlightedTextColor = [UIColor whiteColor];
Vladimir
  • 170,431
  • 36
  • 387
  • 313