Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to reduce/remove the left/right hand margin in a grouped UITableView?

How to reduce/remove the left/right hand margin in a grouped UITableView?

Is there a way to do this without defining a custom view, i.e. using a UITableViewController directly?

I'm NOT asking here about the space between cells, it the space to the left & right of cells you see.

EDIT 1: Can I clarify:

  • already have a custom UITableViewCell ("@interface AppointCell : UITableViewCell") in my solution
  • I think the area to the left and right of these custom UITableViewCell's however are not directly from the cell itself - I say this only as when I put a border around the cell (via it's layer) I can see this - so therefore it seems like the space is from the UITableView itself (not the cells)
  • should point out again I'm using GROUPED mode for the table view
like image 449
Greg Avatar asked Sep 06 '11 22:09

Greg


2 Answers

Sure; just adjust the frame of the UITableView so it's a little wider than its superview and a little to the left (in the negative X direction, in other words) of its left boundary.

like image 136
Noah Witherspoon Avatar answered Sep 17 '22 13:09

Noah Witherspoon


I believe you have to create a custom cell view for your table which has padding on the left and right side.

like image 32
Alan Moore Avatar answered Sep 20 '22 13:09

Alan Moore