IPad UItableView cell content size

Hi, I am facing this strange problem.

I created a UITableView for iPad.

When I check the width of the cell, I found it is 320, but for the iPad I need 768 and 1024.

The screen below shows a TableView in which a cell appears in a table

When I add scrollBar with the 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 displays only the area of ​​width 320 ( cell.contentView.frame.size.width ). what should I do to set the size presentation of the contents of an iPad cell

screen

+3
source share
1 answer

You must use autoResizingFlags correctly. When you create a cell, it has a width of only 320 pixels, but it will be larger on the display.

Try this by creating your scrollview:
previewScrollView.autoresizingFlags = UIViewAutoresizingFlexibleWidth;

, , tableView: tableView:willDisplayCell:atIndexPath:

+5

All Articles