Commit 8ecb4b46 authored by huanglu's avatar huanglu

update

parent affefcd0
......@@ -53,7 +53,7 @@ ImageEditorManger *imageEditorManager = nil;
data.imageURL = [NSURL URLWithString:image.origImage];
[dataSource addObject:data];
}
UIView *currentWindow = [Utils getCurrentVC].view;
UIView *rootView = [Utils getCurrentVC].view;
self.browser.dataSourceArray = dataSource;
self.browser.currentPage = model.index;
if (model.editable) {
......@@ -65,13 +65,13 @@ ImageEditorManger *imageEditorManager = nil;
}
UIEdgeInsets safeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
if (@available(iOS 11.0, *)) {
safeInsets = currentWindow.safeAreaInsets;
safeInsets = rootView.safeAreaInsets;
NSLog(@" safe insets %.2f, %.2f", safeInsets.top, safeInsets.bottom);
} else {
}
CGSize size = currentWindow.screen.bounds.size;
[self.browser showToView:currentWindow containerRect:CGRectMake(safeInsets.left, safeInsets.top, size.width - safeInsets.left - safeInsets.right, size.height - safeInsets.top - safeInsets.bottom)];
CGSize size = rootView.bounds.size;
[self.browser showToView:rootView containerRect:CGRectMake(safeInsets.left, safeInsets.top, size.width - safeInsets.left - safeInsets.right, size.height - safeInsets.top - safeInsets.bottom)];
}
#pragma mark - private
......@@ -89,7 +89,7 @@ ImageEditorManger *imageEditorManager = nil;
[self toEditVC:lfPhotoEditVC];
[self.browser.defaultToolViewHandler.sheetView hideWithAnimation:YES];
} else {
[imgData.yb_auxiliaryViewHandler() yb_showIncorrectToastWithContainer:[Utils currentWindow] text:@"图片未加载完成"];
[imgData.yb_auxiliaryViewHandler() yb_showIncorrectToastWithContainer:[Utils getCurrentVC].view text:@"图片未加载完成"];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment