From ff2aa85775ad448f4198b4955e19d709cc9e07d8 Mon Sep 17 00:00:00 2001 From: Konstantin Zinovev Date: Thu, 10 Aug 2017 17:32:03 +0300 Subject: [PATCH] Fix rotation share dialog controller --- library/Source/Views/VKShareDialogController.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/library/Source/Views/VKShareDialogController.m b/library/Source/Views/VKShareDialogController.m index 875ba19a..38c9b342 100755 --- a/library/Source/Views/VKShareDialogController.m +++ b/library/Source/Views/VKShareDialogController.m @@ -331,18 +331,24 @@ - (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)orientation appear: } - (BOOL)shouldAutorotate { - return YES; + return self.parentViewController.shouldAutorotate; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return YES; + return [self.parentViewController shouldAutorotateToInterfaceOrientation:toInterfaceOrientation]; } - (UIStatusBarStyle)preferredStatusBarStyle { + if (self.parentViewController) { + return [self.parentViewController preferredStatusBarStyle]; + } return UIStatusBarStyleDefault; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { + if (self.parentViewController) { + return [self.parentViewController supportedInterfaceOrientations] + } return UIInterfaceOrientationMaskAll; }