私のコードはここにあります:
CGRect mainFrame = [UIScreen mainScreen].bounds;
_contentView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0.0, mainFrame.size.width, mainFrame.size.height-20)] autorelease];
_contentView.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
_contentView.backgroundColor = [UIColor clearColor];
[self.view addSubview:_contentView];
self.tableView = [[[UITableView alloc] initWithFrame:_contentView.frame style:UITableViewStylePlain] autorelease];
[self.tableView setBackgroundColor:[UIColor clearColor]];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
[self.tableView setSeparatorColor:[UIColor clearColor]];
[_contentView addSubview:_tableView];
self.tableView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
_contentView に tableview を追加し、self.view に _contentView を追加すると、iPhone では問題なく動作しますが、iPad では、テーブル ビューの自動サイズ変更マスクを設定すると幅と高さが増加する理由がわかりません...自動サイズ変更マスクなしでうまく動作します、しかし、風景用のマスクの自動サイズ変更が必要です。これを解決するには?
自動サイズ変更マスクあり 自動サイズ変更マスク
なし