浏览代码

fix iPhone X

Marino Faggiana 7 年之前
父节点
当前提交
ef99f9db7f
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      iOSClient/Library/AHKActionSheet/AHKActionSheet.m

+ 2 - 3
iOSClient/Library/AHKActionSheet/AHKActionSheet.m

@@ -93,7 +93,6 @@ static const CGFloat maxWidth = 414.0f;
         if (@available(iOS 11, *)) {
         if (@available(iOS 11, *)) {
             _bottomPadding = view.safeAreaInsets.bottom;
             _bottomPadding = view.safeAreaInsets.bottom;
         }
         }
-        [_view setFrame:CGRectMake(_view.frame.origin.x, _view.frame.origin.y+_bottomPadding, _view.frame.size.width, _view.frame.size.height-_bottomPadding)];
     }
     }
     
     
     return self;
     return self;
@@ -349,7 +348,7 @@ static const CGFloat maxWidth = 414.0f;
         CGFloat width = CGRectGetWidth(self.view.bounds);
         CGFloat width = CGRectGetWidth(self.view.bounds);
         if (width > maxWidth) width = maxWidth;
         if (width > maxWidth) width = maxWidth;
         
         
-        self.cancelButton.frame = CGRectMake(10 + (CGRectGetWidth(self.view.bounds)/2 - width/2), CGRectGetMaxY(self.view.bounds) - self.cancelButtonHeight, width - 20, self.cancelButtonHeight - kSpaceDivide);
+        self.cancelButton.frame = CGRectMake(10 + (CGRectGetWidth(self.view.bounds)/2 - width/2), CGRectGetMaxY(self.view.bounds) - self.cancelButtonHeight - _bottomPadding, width - 20, self.cancelButtonHeight - kSpaceDivide);
     
     
         // Corner Radius
         // Corner Radius
         self.cancelButton.layer.cornerRadius = 10;
         self.cancelButton.layer.cornerRadius = 10;
@@ -523,7 +522,7 @@ static const CGFloat maxWidth = 414.0f;
     CGRect statusBarViewRect = [self convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil];
     CGRect statusBarViewRect = [self convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil];
     CGFloat statusBarHeight = CGRectGetHeight(statusBarViewRect);
     CGFloat statusBarHeight = CGRectGetHeight(statusBarViewRect);
     
     
-    CGRect frame = CGRectMake((CGRectGetWidth(self.view.bounds)/2 - width/2), statusBarHeight, width, CGRectGetHeight(self.view.bounds) - statusBarHeight - self.cancelButtonHeight - self.separatorHeight);
+    CGRect frame = CGRectMake((CGRectGetWidth(self.view.bounds)/2 - width/2), statusBarHeight, width, CGRectGetHeight(self.view.bounds) - statusBarHeight - self.cancelButtonHeight - self.separatorHeight - _bottomPadding);
 
 
     UITableView *tableView = [[UITableView alloc] initWithFrame:frame];
     UITableView *tableView = [[UITableView alloc] initWithFrame:frame];