Commit e09d11d7 authored by huanglu's avatar huanglu

update

parent 5d5c3dfc
......@@ -63,15 +63,7 @@ ImageEditorManger *imageEditorManager = nil;
}];
[self.browser.defaultToolViewHandler.sheetView.actions addObject:edit];
}
UIEdgeInsets safeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
if (@available(iOS 11.0, *)) {
safeInsets = rootView.safeAreaInsets;
NSLog(@" safe insets %.2f, %.2f", safeInsets.top, safeInsets.bottom);
} else {
}
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)];
[self.browser showToView:rootView containerRect:rootView.bounds.size];
}
#pragma mark - private
......
......@@ -22,8 +22,6 @@
@property (nonatomic, strong) YBIBScreenRotationHandler *rotationHandler;
@property (nonatomic, assign) BOOL transitioning;
@property (nonatomic, strong) UIView *maskView;
@end
@implementation YBImageBrowser {
......@@ -148,14 +146,6 @@
}
}
- (UIView *) maskView {
if (!_maskView) {
_maskView = [[UIView alloc] init];
_maskView.backgroundColor = UIColor.blackColor;
}
return _maskView;
}
#pragma mark - public
- (void)show {
......@@ -168,9 +158,7 @@
- (void)showToView:(UIView *)view containerRect:(CGRect)rect {
[self.rotationHandler startObserveStatusBarOrientation];
[view addSubview:self.maskView];
self.maskView.frame = view.frame;
[self.maskView addSubview:self];
[view addSubview:self];
self.frame = rect;
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
......
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