Skip to content

Fix tablet layout for in-app messaging #2032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 1, 2018
11 changes: 6 additions & 5 deletions Firebase/InAppMessagingDisplay/Modal/FIDModalViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,15 @@ - (void)layoutFineTuneInLandscapeMode {
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];

if (self.buttonBottomToContainerBottomInPortraitMode.active) {
FIRLogDebug(kFIRLoggerInAppMessagingDisplay, @"I-FID300009",
@"Modal view rendered in portrait mode");
[self layoutFineTuneInPortraitMode];
} else {
if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular ||
self.traitCollection.verticalSizeClass == UIUserInterfaceSizeClassCompact) {
FIRLogDebug(kFIRLoggerInAppMessagingDisplay, @"I-FID300010",
@"Modal view rendered in landscape mode");
[self layoutFineTuneInLandscapeMode];
} else {
FIRLogDebug(kFIRLoggerInAppMessagingDisplay, @"I-FID300009",
@"Modal view rendered in portrait mode");
[self layoutFineTuneInPortraitMode];
}

// always scroll to the top in case the body area is scrollable
Expand Down
Loading