Marino Faggiana 7 years ago
parent
commit
8ada903b8d
1 changed files with 7 additions and 0 deletions
  1. 7 0
      iOSClient/Library/AHKActionSheet/AHKActionSheetViewController.m

+ 7 - 0
iOSClient/Library/AHKActionSheet/AHKActionSheetViewController.m

@@ -22,6 +22,8 @@
 {
 {
     [super viewDidLoad];
     [super viewDidLoad];
 
 
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotateDeviceChangeNotification:) name:UIDeviceOrientationDidChangeNotification object:nil];
+    
     [self.view addSubview:self.actionSheet];
     [self.view addSubview:self.actionSheet];
     self.actionSheet.frame = self.view.bounds;
     self.actionSheet.frame = self.view.bounds;
 }
 }
@@ -55,6 +57,11 @@
     return UIInterfaceOrientationMaskAll;
     return UIInterfaceOrientationMaskAll;
 }
 }
 
 
+-(void)didRotateDeviceChangeNotification:(NSNotification *)notification
+{
+    [self.actionSheet dismissAnimated:NO];
+}
+
 - (UIStatusBarStyle)preferredStatusBarStyle
 - (UIStatusBarStyle)preferredStatusBarStyle
 {
 {
     UIWindow *window = self.actionSheet.previousKeyWindow;
     UIWindow *window = self.actionSheet.previousKeyWindow;