Skip to content

Commit

Permalink
support no hide thumb view
Browse files Browse the repository at this point in the history
  • Loading branch information
cuzv committed Mar 16, 2017
1 parent e3e61b1 commit 8ed8420
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ PhotoBrowser is a light weight photo browser, like the wechat, weibo image viewe
- 增加图片显示模式兼容,长图显示头部的时候 dismiss 动画图片会还原到 thumb 显示的位置。
- 修复 present 的时候画面拉升。
- 切换图片的时候隐藏对应的 thumb view。
- 优化内部实现逻辑(0.5.9)
- 优化内部实现逻辑(0.5.9)


### 0.6

- 调节背景亮度
- 调节背景亮度

### 0.6.1

- 修复 dismiss 后滑动界面奔溃的问题
- 修复 dismiss 后滑动界面奔溃的问题。

### 0.6.2

- 支持部不隐藏 thumb view 选项。
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ - (void)handleTapedImageView:(UITapGestureRecognizer *)sender {
- (void)_showPhotoBrowser:(UIView *)sender {
PBViewController *pbViewController = [PBViewController new];
pbViewController.blurBackground = NO;
// pbViewController.hideThumb = NO;
pbViewController.pb_dataSource = self;
pbViewController.pb_delegate = self;
pbViewController.pb_startPage = sender.tag;
Expand Down
2 changes: 1 addition & 1 deletion PhotoBrowser.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "PhotoBrowser"
s.version = "0.6.1"
s.version = "0.6.2"
s.summary = "PhotoBrowser is a light weight photo browser, like the wechat, weibo image viewer."

s.homepage = "https://github.com/cuzv/PhotoBrowser.git"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/cuzv/PhotoBrowser/blob/master/LICENSE)
[![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-v0.6.1-green.svg)](https://github.com/CocoaPods/CocoaPods)
[![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-v0.6.2-green.svg)](https://github.com/CocoaPods/CocoaPods)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Weibo](https://img.shields.io/badge/Weibo-cuzval-yellowgreen.svg)](http://weibo.com/cuzval/)
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](http://twitter.com/mochxiao)
Expand Down
2 changes: 2 additions & 0 deletions Sources/PBViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@
- (void)reloadWithCurrentPage:(NSInteger)index;
/// Default value is `YES`
@property (nonatomic, assign) BOOL blurBackground;
/// Default value is `YES`
@property (nonatomic, assign) BOOL hideThumb;

@end
4 changes: 4 additions & 0 deletions Sources/PBViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ - (instancetype)initWithTransitionStyle:(UIPageViewControllerTransitionStyle)sty
self.transitioningDelegate = self;
_contentsRect = CGRectMake(0, 0, 1, 1);
_blurBackground = YES;
_hideThumb = YES;

return self;
}
Expand Down Expand Up @@ -542,6 +543,9 @@ - (void)_showIndicator {
}

- (void)_hideThumbView {
if (!_hideThumb) {
return;
}
NSLog(@"_hideThumbView");
self.lastThumbView.hidden = NO;
UIView *currentThumbView = self.currentThumbView;
Expand Down

0 comments on commit 8ed8420

Please sign in to comment.