Commit f2bd2bc1 authored by sunzheng's avatar sunzheng
parents a2c10321 49a6ae65
......@@ -63,7 +63,7 @@ ImageEditorManger *imageEditorManager = nil;
}];
[self.browser.defaultToolViewHandler.sheetView.actions addObject:edit];
}
[self.browser showToView:rootView containerRect:rootView.bounds];
[self.browser showToView:rootView containerSize:rootView.bounds.size];
}
#pragma mark - private
......
......@@ -37,6 +37,7 @@ typedef void (^YBIBImageSingleTouchBlock)(YBIBImageData *imageData);
/// 内部图片滚动视图状态回调闭包
typedef void (^YBIBImageScrollViewStatusBlock)(YBIBImageData *imageData, UIScrollView *scrollView);
/**
图片数据类,承担配置数据和处理数据的责任
*/
......
......@@ -102,7 +102,7 @@ static CGFloat kOffsetSpace = 5;
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
self.tableView.frame = _tableHideFrame;
self.tableView.tableFooterView = [UIView new];
self.tableView.tableFooterView.bounds = CGRectMake(0, 0, self.tableView.frame.size.width, footerHeight);
[UIView animateWithDuration:self.showDuration animations:^{
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:self->_backAlpha];
self.tableView.frame = self->_tableShowFrame;
......
......@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
@param view 指定父视图(view 的大小不能为 CGSizeZero,但允许变化)
@param containerSize 容器大小(当 view 的大小允许变化时,必须指定确切的 containerSize)
*/
- (void)showToView:(UIView *)view containerRect:(CGRect)rect;
- (void)showToView:(UIView *)view containerSize:(CGSize)containerSize;
- (void)showToView:(UIView *)view;
- (void)show;
......
......@@ -21,7 +21,6 @@
@property (nonatomic, strong) YBIBDataMediator *dataMediator;
@property (nonatomic, strong) YBIBScreenRotationHandler *rotationHandler;
@property (nonatomic, assign) BOOL transitioning;
@end
@implementation YBImageBrowser {
......@@ -153,19 +152,20 @@
}
- (void)showToView:(UIView *)view {
[self showToView:view containerRect:view.bounds];
[self showToView:view containerSize:view.bounds.size];
}
- (void)showToView:(UIView *)view containerRect:(CGRect)rect {
- (void)showToView:(UIView *)view containerSize:(CGSize)containerSize {
[self.rotationHandler startObserveStatusBarOrientation];
[view addSubview:self];
self.frame = rect;
self.frame = view.bounds;
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_originWindowLevel = self.window.windowLevel;
[self hideStatusBar];
[self.rotationHandler configContainerSize:rect.size];
[self.rotationHandler configContainerSize:containerSize];
[self.dataMediator preloadWithPage:self.currentPage];
......@@ -212,7 +212,6 @@
self.transitioning = YES;
[self.animatedTransition yb_hideTransitioningWithContainer:self startView:startView endView:endView orientation:self.rotationHandler.currentOrientation completion:^{
[self rebuild];
[self.maskView removeFromSuperview];
[self removeFromSuperview];
self.transitioning = NO;
}];
......
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