Просмотр исходного кода

Improve the starting position of the toolbar.

Move it down so it doesn’t start off covering a navigation bar.
Ryan Olson лет назад: 12
Родитель
Сommit
809bc72a4f
1 измененных файлов с 2 добавлено и 6 удалено
  1. 2 6
      Classes/Explorer Toolbar/FLEXExplorerViewController.m

+ 2 - 6
Classes/Explorer Toolbar/FLEXExplorerViewController.m

@@ -88,12 +88,8 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     // Toolbar
     self.explorerToolbar = [[FLEXExplorerToolbar alloc] init];
     CGSize toolbarSize = [self.explorerToolbar sizeThatFits:self.view.bounds.size];
-    CGFloat toolbarOriginY = 0.0;
-    CGRect statusBarFrame = [self.view convertRect:[[UIApplication sharedApplication] statusBarFrame] fromView:nil];
-    CGFloat statusBarBottomEdge = CGRectGetMaxY(statusBarFrame);
-    if (statusBarBottomEdge > 0) {
-        toolbarOriginY = statusBarBottomEdge;
-    }
+    // Start the toolbar off below any bars that may be at the top of the view.
+    CGFloat toolbarOriginY = 100.0;
     self.explorerToolbar.frame = CGRectMake(0.0, toolbarOriginY, toolbarSize.width, toolbarSize.height);
     self.explorerToolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
     [self.view addSubview:self.explorerToolbar];