I've never seen a perfect layout strategy for detail views containing several heterogeneous rows, e.g., one row for name, one for address, one for email, one for age ..., just like the name editing view of Contacts, but more complex.
Obviously, it is a perfect "table" thing, and UITableView's group style is preferable to plain listing of rows (refer to the name editing view of Contacts).
However, UITableView is not flexible enough to handle the heterogeneity: the tableView:cellForRowAtIndexPath:
method will be messed up with complex branches for different kinds of rows, like this:
switch (row) {
case kNameRowIndex:
nameField.text = name;
break;
case kaddressRowIndex:
addressField.text = address;
break;
case kEmailRowIndex:
emailField.text = email;
break;
case kAgeRowIndex:
ageField.text = age;
break;
...
default:
}
This problem can be perfectly resolved if UITableView can be populated with static UITableViewCells in Interface Builder, which seems impossible, isn't it?
So what's best layout strategy for such detail views?