Reputation: 16829
I'm working on a universal app and the view I'm working on is common to iPhone and iPad. I display a UITableView (with grouped style) and I made a custom cell (programmatically - no nib). I read somewhere (can't find where anymore) that the margins are of 1/16 * width of the table. So I set the width of my custom cell to 14/16 * width of the table but that's not good. Or at least it doesn't work well.
Can someone confirm or invalidate that the margins are 1/16 * width of the table?
And in the case that's not 1/16, how can compute that size?
Upvotes: 1
Views: 683
Reputation: 6707
iPhone portrait margins : 10 pixels
iPhone landscape or iPad margins:
- if table width<400 then 10 pixels
- else margin = 6% of table width, with minimum of 31 pixels, max of 45 pixels
Upvotes: 2
Reputation: 31
I believe the default horizontal margin is 10 pixels. But you could use auto resizing, eg UIViewAutoresizingFlexibleWidth. Look at the UIView documentation.
Upvotes: 0