Commit 4ed40fc5 authored by huanglu's avatar huanglu

update

parent 242eddf0
...@@ -74,7 +74,7 @@ NSBundle *YBIBDefaultBundle(void) { ...@@ -74,7 +74,7 @@ NSBundle *YBIBDefaultBundle(void) {
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
NSBundle *_bundle = [NSBundle bundleForClass:NSClassFromString(@"YBImageBrowser")]; NSBundle *_bundle = [NSBundle bundleForClass:NSClassFromString(@"YBImageBrowser")];
NSString *path = [_bundle pathForResource:@"YBImageBrowser.bundle/YBImageBrowser" ofType:@"bundle"]; NSString *path = [_bundle pathForResource:@"YBImageBrowser" ofType:@"bundle"];
bundle = [NSBundle bundleWithPath:path]; bundle = [NSBundle bundleWithPath:path];
}); });
return bundle; return bundle;
......
...@@ -37,6 +37,7 @@ typedef void (^YBIBImageSingleTouchBlock)(YBIBImageData *imageData); ...@@ -37,6 +37,7 @@ typedef void (^YBIBImageSingleTouchBlock)(YBIBImageData *imageData);
/// 内部图片滚动视图状态回调闭包 /// 内部图片滚动视图状态回调闭包
typedef void (^YBIBImageScrollViewStatusBlock)(YBIBImageData *imageData, UIScrollView *scrollView); typedef void (^YBIBImageScrollViewStatusBlock)(YBIBImageData *imageData, UIScrollView *scrollView);
/** /**
图片数据类,承担配置数据和处理数据的责任 图片数据类,承担配置数据和处理数据的责任
*/ */
......
...@@ -102,7 +102,7 @@ static CGFloat kOffsetSpace = 5; ...@@ -102,7 +102,7 @@ static CGFloat kOffsetSpace = 5;
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0]; self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
self.tableView.frame = _tableHideFrame; 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:^{ [UIView animateWithDuration:self.showDuration animations:^{
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:self->_backAlpha]; self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:self->_backAlpha];
self.tableView.frame = self->_tableShowFrame; self.tableView.frame = self->_tableShowFrame;
......
...@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
@param view 指定父视图(view 的大小不能为 CGSizeZero,但允许变化) @param view 指定父视图(view 的大小不能为 CGSizeZero,但允许变化)
@param containerSize 容器大小(当 view 的大小允许变化时,必须指定确切的 containerSize) @param containerSize 容器大小(当 view 的大小允许变化时,必须指定确切的 containerSize)
*/ */
- (void)showToView:(UIView *)view containerRect:(CGRect)rect; - (void)showToView:(UIView *)view containerSize:(CGSize)containerSize;
- (void)showToView:(UIView *)view; - (void)showToView:(UIView *)view;
- (void)show; - (void)show;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
@property (nonatomic, strong) YBIBDataMediator *dataMediator; @property (nonatomic, strong) YBIBDataMediator *dataMediator;
@property (nonatomic, strong) YBIBScreenRotationHandler *rotationHandler; @property (nonatomic, strong) YBIBScreenRotationHandler *rotationHandler;
@property (nonatomic, assign) BOOL transitioning; @property (nonatomic, assign) BOOL transitioning;
@end @end
@implementation YBImageBrowser { @implementation YBImageBrowser {
...@@ -153,19 +152,20 @@ ...@@ -153,19 +152,20 @@
} }
- (void)showToView:(UIView *)view { - (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]; [self.rotationHandler startObserveStatusBarOrientation];
[view addSubview:self]; [view addSubview:self];
self.frame = rect; self.frame = view.bounds;
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_originWindowLevel = self.window.windowLevel; _originWindowLevel = self.window.windowLevel;
[self hideStatusBar]; [self hideStatusBar];
[self.rotationHandler configContainerSize:rect.size]; [self.rotationHandler configContainerSize:containerSize];
[self.dataMediator preloadWithPage:self.currentPage]; [self.dataMediator preloadWithPage:self.currentPage];
...@@ -212,7 +212,6 @@ ...@@ -212,7 +212,6 @@
self.transitioning = YES; self.transitioning = YES;
[self.animatedTransition yb_hideTransitioningWithContainer:self startView:startView endView:endView orientation:self.rotationHandler.currentOrientation completion:^{ [self.animatedTransition yb_hideTransitioningWithContainer:self startView:startView endView:endView orientation:self.rotationHandler.currentOrientation completion:^{
[self rebuild]; [self rebuild];
[self.maskView removeFromSuperview];
[self removeFromSuperview]; [self removeFromSuperview];
self.transitioning = NO; 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