UItableView Cell Content size for iPad

ios, ipad, objective-c

Solution

You should use autoResizingFlags correctly. On creation, the cell is only 320px width, but on display it will be larger.

Try this, when creating your scrollview: `previewScrollView.autoresizingFlags = UIViewAutoresizingFlexibleWidth;`

This should work, but when you even need more control, you can still use the tableView delegate method: `tableView:willDisplayCell:atIndexPath:`

Problem

Hi I face the strange problem. I have created UITableView for iPad. When I check the cell width i found it's 320 but for iPad i need 768 and 1024. The below screen shows the TableView in which the cell shows in Table When I add scrollBar with following `UIScrollView *previewScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, cell.contentView.frame.size.width, 250)]; ` ``` NSLog(@"cell.contentView.frame.size.widt %f",cell.contentView.frame.size.width); ``` the scrollbar shows only 320 width(cell.contentView.frame.size.width) area. what should i do for set the iPad size cell content view

Original source