kenmickles closed pull request #135: CB-13396: (ios) Fix image sizing on iPhone
X
URL: https://github.com/apache/cordova-plugin-splashscreen/pull/135
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m
index ab97055a..fdab6ee3 100644
--- a/src/ios/CDVSplashScreen.m
+++ b/src/ios/CDVSplashScreen.m
@@ -352,7 +352,15 @@ - (void)updateBounds
if ([self isUsingCDVLaunchScreen]) {
// CB-9762's launch screen expects the image to fill the screen and be
scaled using AspectFill.
CGSize viewportSize = [UIApplication
sharedApplication].delegate.window.bounds.size;
- _imageView.frame = CGRectMake(0, 0, viewportSize.width,
viewportSize.height);
+ CGFloat imageHeight = viewportSize.height;
+
+ // make LaunchStoryboard bottom space constraint work with iOS 11 safe
areas
+ if (@available(iOS 11.0, *)) {
+ UIEdgeInsets safeAreaInsets = [UIApplication
sharedApplication].delegate.window.safeAreaInsets;
+ imageHeight -= safeAreaInsets.bottom;
+ }
+
+ _imageView.frame = CGRectMake(0, 0, viewportSize.width, imageHeight);
_imageView.contentMode = UIViewContentModeScaleAspectFill;
return;
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]