Marino Faggiana преди 7 години
родител
ревизия
8ada903b8d
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7 0
      iOSClient/Library/AHKActionSheet/AHKActionSheetViewController.m

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

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