0

I have a UITableView that is grouped with many sections. Each section has 1 to n cells. I am trying to have the cells take the entire width, but cannot figure out how to do it. I have searched but cannot find any samples or information of how to so it.

I have put an example screenshot below.

I have this:

enter image description here

And I am trying to achieve this:

enter image description here

I will be making the cell a square box with a gradient and styling the headers, but I cannot figure out how to make the cell fill the width of the screen.

Thanks for the help.

LilMoke
  • 3,176
  • 7
  • 48
  • 88

1 Answers1

1

If you want to change the width of a cell, you could simply change the width of the table, or change the width of the contentView in the cell.

The answer to this question details how to do the latter.

Community
  • 1
  • 1
bibo bode
  • 1,150
  • 1
  • 10
  • 17
  • I did subclass the cell and I did override setFrame, I was able to set the width, but the x location was still inset. – LilMoke Dec 18 '12 at 18:14
  • Yes, that does work if I specify a negative number for the x axis. I guess I was on the right track but overlooked negative numbers!! Working now... thanks for the help!! – LilMoke Dec 18 '12 at 18:21