さまざまなビューを上下に配置する必要がある、わずかに拡張された UI があります。そのため、各ビューを個別UIView
のクラスとして作成し、それらを上下に貼り付けてUIViewController
.
私が直面している問題は、 のフレームがとUIViews
で異なることです。私が望むように動作します。iOS7
iOS8
iOS7
||
最初のスクリーンショットは iOS8 のもので、2 番目は iOS7 のものです。ビューを追加するときに、次のように高さを具体的に指定しました。
UIViewController *test = [self.storyboard instantiateViewControllerWithIdentifier:@"GeneralMatchInfoViewController"];
_generalMatchFrame = test.view.frame;
_generalMatchFrame.origin.x = 10.0f;
_generalMatchFrame.size.width = self.scrollBaseView.frame.size.width - 20.0f;
_generalMatchFrame.size.height = 255.0f;
test.view.frame = _generalMatchFrame;
[self addChildViewController:test];
[self.scrollBaseView addSubview:test.view];
[test didMoveToParentViewController:self];
iOS7
左から 10 ピクセルを持ち、フレームを正しく設定して、完全に調整します。しかしiOS8
では、フレーム サイズは 255 ではありません。サイズ クラスを使用しています。なぜこうなった?