0

Is there a constant that returns the secondary background color of a UITableView with style "grouped" ? That's the gray color here :

enter image description here

I've tried UIColor.groupTableViewBackgroundColor but it returns apparently the background color of the rows (light gray), not of the secondary background color (gray).

Arnaud
  • 7,259
  • 10
  • 50
  • 71
  • I could hardcode the color rgb components, but that would fail if apple change the default UI colors... – Arnaud Feb 06 '13 at 08:17
  • Ok, found the answer here : http://stackoverflow.com/questions/12452810/is-grouptableviewbackgroundcolor-deprecated-on-ios-6 I mark my question as duplicate... – Arnaud Feb 06 '13 at 08:20

3 Answers3

2
  1. Add the QuartzCore framework in your app.

  2. Import the framework in your .h or .m file

  3. Then -

    tbl.layer.borderColor
    
Girish
  • 4,692
  • 4
  • 35
  • 55
  • Does not seems to work... I use `[UIColor colorWithCGColor:myTableView.layer.borderColor]` and it brings me black color – Arnaud Feb 06 '13 at 08:11
1

Use layer property. try like something this

UIColor.groupTableView.layer.borderColor
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
1

tableView.separatorColor gives border color. I think that is you want.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Justin Mathews
  • 512
  • 4
  • 18
  • Maybe i was not precise enough in my question, I want the secondary background color (gray), not the border color – Arnaud Feb 06 '13 at 08:12