CB-8988: Fix rotation on iOS/iPad (closes #46)
authorDan Polivy <dan@cellartracker.com>
Thu, 7 May 2015 23:37:02 +0000 (16:37 -0700)
committerShazron Abdullah <shazron@apache.org>
Tue, 12 May 2015 00:46:58 +0000 (17:46 -0700)
commit87f3c3a3ac2c7c39f74f1173109377e87bd35078
tree29d05908a4a46a7b0aa9a96fa4e94646f5f8dfa2
parent6cc3d1f3fe71309055a9f3778c75c5360c0a1ec6
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>
src/ios/CDVSplashScreen.m