1:YBImageBrowser.m文件第37行加入
- (void)layoutSubviews {
[super layoutSubviews];
self.bounds = [UIApplication sharedApplication].keyWindow.bounds;
self.collectionView.frame = self.bounds;
self.containerView.frame = self.bounds;
for (id<YBIBToolViewHandler> handler in self.toolViewHandlers) {
[handler yb_containerViewIsLayoutSubviews];
}
}
2:在YBIBImageCell.m文件第37行加入
- (void)layoutSubviews {
[super layoutSubviews];
self.imageScrollView.frame = self.bounds;
CGSize size = self.imageScrollView.imageView.image.size;
[self updateImageLayoutWithOrientation:self.yb_currentOrientation() previousImageSize:size];
}
在113行加入
containerSize = self.bounds.size;
3:在YBIBToolViewHandler.h加入方法
/**
LayoutSubviews
*/
- (void)yb_containerViewIsLayoutSubviews;
在YBIBToolViewHandler.m加入方法
- (void)yb_containerViewIsLayoutSubviews {
[self layoutWithExpectOrientation:self.yb_currentOrientation()];
}
在第74行加入代码
containerSize = [UIApplication sharedApplication].keyWindow.bounds.size;