Merge pull request #21 from gbenvenuti/master

Updated iOS8 for #19 removed delay block
This commit is contained in:
Grant Benvenuti 2014-09-11 06:32:13 +10:00
commit d1ff1547d9
2 changed files with 3 additions and 11 deletions

View File

@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
id="net.yoik.cordova.plugins.screenorientation" id="net.yoik.cordova.plugins.screenorientation"
version="1.2.0"> version="1.2.1">
<name>Screen Orientation</name> <name>Screen Orientation</name>
<description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS and BB10.</description> <description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS and BB10.</description>

View File

@ -31,16 +31,8 @@ SOFTWARE.
// SEE https://github.com/Adlotto/cordova-plugin-recheck-screen-orientation // SEE https://github.com/Adlotto/cordova-plugin-recheck-screen-orientation
// HACK: Force rotate by changing the view hierarchy. Present modal view then dismiss it immediately. // HACK: Force rotate by changing the view hierarchy. Present modal view then dismiss it immediately.
[self.viewController presentViewController:[UIViewController new] animated:NO completion:nil];
UIViewController *vc = [[UIViewController alloc] init]; [self.viewController dismissViewControllerAnimated:NO completion:nil];
vc.view.alpha = 0;
[self.viewController presentViewController:vc animated:NO completion:^{
// added to support iOS8 beta 5, @see issue #19
dispatch_after(0, dispatch_get_main_queue(), ^{
[self.viewController dismissViewControllerAnimated:NO completion:nil];
});
}];
// grab the device orientation so we can pass it back to the js side. // grab the device orientation so we can pass it back to the js side.
NSString *orientation; NSString *orientation;