I have a slightly extensive UI where I have to place different views one below the other. So I've created each view as a separate UIView class and pasted them one below the other onto a UIViewController.
The issue I'm facing is that the frame of the UIViews are different in iOS7 and iOS8. iOS7 works the way I want it.
||
The first screenshot is from iOS8 and the second is from iOS7. I specifically provided the height while adding the views as well like so:
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 adjusts perfectly, having 10 pixels from the left and setting the frame correctly. But on iOS8, the frame size is not 255. I'm using size class. Why is this happening?
Aucun commentaire:
Enregistrer un commentaire