IOS7 and iOS8 UI Frame issue
I have a slightly advanced interface where I have to place different views one after the other. Therefore, I created each view as a separate class UIView
and inserted them one under the other on UIViewController
.
The problem I'm having is that the frame UIViews
is different from 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 when adding views just like this:
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 by having 10 pixels to the left and setting the frame correctly. But the iOS8
frame size is not 255. I am using the size class. Why is this happening?
source to share
No one has answered this question yet
Check out similar questions: