I have a static UITableView with 3 rows in 1 section. Each row contains a UITextView, the size of which should vary depending on the content. Each UITextView object has scrolling disabled to make it grow. Each is attached on all 4 sides to the contents of the cellView and has no other restrictions.
When I launch the iPad (real or sim), the cell resizes to one line of text regardless of the contents of the UITextView. When I examine the view hierarchy in the debugger, I see that the height of the UITextView is set to 27.5, although the height of the content view is 183.5. This appears to be the result of a height restriction on the UITableViewCellContentView, which limits the height of the cell. This is not a limitation that I have set. My table view controller does not have a heightForRow or cellForRow method, since it is a static table view and uses auto-layout for everything. I do not know how this restriction is added.

Here is the same hierarchy with the same content at the same point as when working on iPod touch. Note that the height of the UITextView and the height of the content are the same this time. In this case, the UITableViewCellContentView's height restriction is large enough to match the height of the UITextView.

In both cases, this is the same source that executes and displays the same content. This content contains short text lines with a carriage return, so for both screen sizes it should be the same size. UITextView wants to increase its height to 183.5, but on the iPad the cell height is unreasonably limited by the restriction created by iOS.
Here is the code for viewDidLoad:
- (void)viewDidLoad { [super viewDidLoad]; //shrink the uiswitch a little bit self.displayRegexCharsSwitch.transform = CGAffineTransformMakeScale(0.70, 0.70); //these next 2 lines set up the table to automatically resize based on content self.tableView.estimatedRowHeight = 100.0f; self.tableView.rowHeight = UITableViewAutomaticDimension; //next line hides the blank cells self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; //these are needed on iPad or rows with accessory view don't resize [self.tableView beginUpdates]; [self.tableView endUpdates]; }
Again, in the table view manager there is no heightForRow or cellForRow due to the use of a static table view.
I am puzzled. Why is UITextField reporting a different size of content on the iPad than on the iPod if the content is the same and the code is the same? From the view of the hierarchy, it is clear that UITextField internally knows that its height is 200, but contentSize returns 27.5. This is a static view of the table, so there is no heightForRow method and cellForRow method. I am depending on the auto layout to control the entire layout - what it does right on the iPad.
EDIT
FYI. The design is based solely on the Any / Any size class.
