cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8988) [splashscreen] iOS splash screen rotation incorrectly scales image
Date Tue, 12 May 2015 00:49:00 GMT

    [ https://issues.apache.org/jira/browse/CB-8988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14539003#comment-14539003
] 

ASF subversion and git services commented on CB-8988:
-----------------------------------------------------

Commit 87f3c3a3ac2c7c39f74f1173109377e87bd35078 in cordova-plugin-splashscreen's branch refs/heads/master
from [~dpolivy]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-splashscreen.git;h=87f3c3a ]

CB-8988: Fix rotation on iOS/iPad (closes #46)

The viewController.interfaceOrientation passed to getImageName has not
yet been updated with the new orientation, even when the frame/bounds
change event has fired. Thus, the plugin never actually loads the
correct image for the new orientation. Instead, it poorly scales the
existing image.

This fix uses the statusBarOrientation property of the UIApplication
object to detect the actual orientation, and correctly load the right
image.

Signed-off-by: Shazron Abdullah <shazron@apache.org>


> [splashscreen] iOS splash screen rotation incorrectly scales image
> ------------------------------------------------------------------
>
>                 Key: CB-8988
>                 URL: https://issues.apache.org/jira/browse/CB-8988
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin SplashScreen
>         Environment: iOS
>            Reporter: Dan Polivy
>
> On iOS devices, if rotation occurs while the splash screen is visible, it ends up horribly/incorrectly
scaling the existing image, instead of loading the correctly oriented image.
> This happens on both iPad and iPhone -- although technically iPhone should not allow
rotation at all. (I see there is another issue tracking that for iPhone.)
> From debugging, the issue appears to be that the interfaceOrientation of the viewController
has not been updated at the time that the frame/bounds changes are observed by the plugin.
Thus, even though the frame/bounds change, the correct image for the new orientation is never
loaded.
> I will provide a PR with an alternate fix shortly. I found it worked better to use [[UIApplication
sharedApplication] statusBarOrientation] to determine orientation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message