apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

Splashscreen content not fitting or centered after screen rotation #1342

Closed furdakov closed 1 year ago

furdakov commented 1 year ago

Bug Report

Problem

When the screen is rotated, the splashscreen does not fit the screen anymore and the content is not centered. The view retains the size it had when the app started. This can be seen:

at app startup, while the splashscreen is still visible (and rotating the screen) at runtime, when showing the splashscreen with navigator.splashscreen.show() (and the screen has been rotated)

What is expected to happen?

The splashscreen should always fit the screen and has its content centered.

What does actually happen?

The splashscreen does not fit the screen. The webview content is then visible in the area of the screen not covered by the splashscreen view.

Information

config.xml:

...
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
...
        <splash src="res/screen/ios/SplashScreen@2x~universal~anyany.png" />
        <splash src="res/screen/ios/SplashScreen@2x~universal~comany.png" />
        <splash src="res/screen/ios/SplashScreen@2x~universal~comcom.png" />
        <splash src="res/screen/ios/SplashScreen@3x~universal~anyany.png" />
        <splash src="res/screen/ios/SplashScreen@3x~universal~anycom.png" />
        <splash src="res/screen/ios/SplashScreen@3x~universal~comany.png" />
...

Environment, Platform, Device

ios, iPad

Version information

cordova-ios: 6.2.0 Xcode: 13.3.1 iOS: 15.4.1

Checklist

erisu commented 1 year ago

The issue has been transferred to the "cordova-ios" repository for further discussion and resolution.

Please note that the "cordova-plugin-splashscreen" repository no longer includes the iOS SplashScreen logic. This change was implemented some time ago, and the SplashScreen functionality has been integrated into the core of Cordova-iOS.

dpogue commented 1 year ago

I believe this was fixed in https://github.com/apache/cordova-ios/pull/1315, which will be part of the upcoming cordova-ios 7.0.0 release.