mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-02-24 17:12:58 +08:00
Updated iOS implementation to support iOS8 beta see #19
This commit is contained in:
parent
7c86844895
commit
e2983442cc
@ -33,7 +33,15 @@ SOFTWARE.
|
|||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
// 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:^{ [self.viewController dismissViewControllerAnimated:NO completion:nil]; }];
|
UIViewController *vc = [[UIViewController alloc] init];
|
||||||
|
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];
|
||||||
|
});
|
||||||
|
}];
|
||||||
|
|
||||||
// Assume everything went ok
|
// Assume everything went ok
|
||||||
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
|
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
|
||||||
|
Loading…
Reference in New Issue
Block a user