Browse Source

change routine create background menu

Marino Faggiana 7 years ago
parent
commit
5efa2124d0
2 changed files with 9 additions and 1 deletions
  1. 2 0
      iOSClient/Library/REMenu/REMenu.h
  2. 7 1
      iOSClient/Main/CCMain.m

+ 2 - 0
iOSClient/Library/REMenu/REMenu.h

@@ -116,4 +116,6 @@ typedef NS_ENUM(NSInteger, REMenuLiveBackgroundStyle) {
 - (void)closeWithCompletion:(void (^)(void))completion;
 - (void)close;
 
+- (CGFloat)computeNavigationBarOffset;
+
 @end

+ 7 - 1
iOSClient/Main/CCMain.m

@@ -3062,8 +3062,14 @@
 
 - (void)createReMenuBackgroundView:(REMenu *)menu
 {
+    UILayoutGuide *layoutGuide;
+    if (@available(iOS 11, *)) {
+        layoutGuide = [UIApplication sharedApplication].delegate.window.safeAreaLayoutGuide;
+    }
+    
+    CGFloat computeNavigationBarOffset = [menu computeNavigationBarOffset];
     UIViewController *rootController = [[[[UIApplication sharedApplication]delegate] window] rootViewController];
-    //_reMenuBackgroundView.frame = CGRectMake(0, 0, rootController.view.frame.size.width,  rootController.view.frame.size.height);
+    _reMenuBackgroundView.frame = CGRectMake(0, computeNavigationBarOffset, rootController.view.frame.size.width,  rootController.view.frame.size.height);
 
     [UIView animateWithDuration:0.2 animations:^{