Hi people, I’m quite new to ionic and cordova, but I’ve been working on this project and I’m having issues with the splash screens on ipads.
It seems that the splash screens is able to rotate beyond it’s initial orientation, which would be fine if it is displayed properly, however, it seems that the image selected is wrong and it gets scaled and distorted.
I’m using the plugin ‘org.apache.cordova.splashscreen’ and my device is an iPad 2 with iOS 8.2.
I’ve run a few tests on xcode and logged the data from the plugin. These are my findings:
- initial orientation mask is right, in updateImage it looks for the specified image
- but when it comes to updateBounds when it compares view bound against the image size to get the ratio, that’s where it screws up. the view bounds might have changed by then.
I’ve come up with 2 possible solutions, but can’t seem to find a proper one yet.
- prevent auto rotation before webview loads - can’t seem to get it to work in a plugin, not exactly sure how i should use ‘CDVScreenOrientationDelegate’
- load both portrait and landscape splash images and switch immediately
I’ve attached the photo here:
Any comments from the pros? thanks!