I am new to iOS dev and very new to storyboards. I am trying to create a basic form using a UITableView with static cells and a "grouped" style.
I hope to make only one storyboard and use it for both iPhone and iPad, but I’m not sure if this is recommended, but I don’t have design elements specific to any device, so there would be a lot of repetition if I support a separate storyboard for both device families.
Therefore, I drag the label to the left side of the table cell and enter text on the right, then I use the machine and set some restrictions: - The label has a leading location for viewing 30 - TextField has a finite space for viewing 30 - Limiting the horizontal distance between the label and the text field - Limiting fixed width on label
It works great on the iPhone, but on the iPad, the shortcut and text box go beyond the table cell. This is because the iPad has wider margins (wider than the 30pt restrictions that I used) on the left and right side of the table cells.
Obviously, why this does not work. I think my question is that this is a common scenario, and I suspect there is a simple solution. Interested in hearing recommendations. Is there a way to limit the label and text box to the edges of the cell, and not to the edges of the table? If not, I have to:
- Replicate storyboards for iPhone and iPad.
- Use a form library like QuickDialog
- Add and organize shortcuts and text fields programmatically
- Any other suggestions?
Here is a screenshot showing the limitations of auto-layout: 
And this is what the layout looks like on an iPad: 
ios uitableview autolayout
Bruce May 18 '13 at 12:05 a.m.
source share