mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-02-24 09:02:51 +08:00
Updated iOS8 for #19 removed delay block
This commit is contained in:
parent
61cd864608
commit
31d49c8936
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user