Поскольку обновление до iOS 9, ячейка таблицы в ландшафте iPad больше не растягивает всю ширину таблицы в моих модульных тестах.
Мой тест - это простая таблица, которая делает снимок в конце.
- (void)testTableSize{
UIViewController *viewController = [[UIViewController alloc] init];
UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0,0,viewController.view.bounds.size.width, viewController.view.bounds.size.height) style:UITableViewStylePlain];
tableView.dataSource = self;
tableView.delegate = self;
[tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
[viewController.view addSubview:tableView];
ASCSnapshotVerifyViewiPad([viewController view]);
}
Ячейки очень просты для этого примера
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
cell.textLabel.backgroundColor = [UIColor blueColor]; // Demo purpose
cell.textLabel.backgroundColor = [UIColor yellowColor]; // Demo purpose
cell.textLabel.text = [NSString stringWithFormat:@"Cell %d", (int)indexPath.row];
return cell;
но моя ячейка рисуется с большим отрывом слева и справа. Любая идея почему?