Skip to content

Commit

Permalink
-调整下拉到距离
Browse files Browse the repository at this point in the history
  • Loading branch information
lincf0912 committed Mar 3, 2020
1 parent a9e01c3 commit 154d5b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions LFPhotoBrowserDEMO/LFPhotoBrowserDEMO/class/LFPhotoBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ typedef NS_ENUM(NSInteger, SlideDirection) {
@property (nonatomic, assign) BOOL isNeedPageControl;
/** 是否需要下拉动画,default is NO */
@property (nonatomic, assign) BOOL canPullDown;
/** 下拉动画距离,default is 10.0 */
@property (nonatomic, assign) float pullDownDistance;
/** 是否淡化,default is NO*/
@property (nonatomic, assign) BOOL isWeaker;
/** 是否批量下载(数据源所有的对象进行下载,注意:开启后只会批量下载原图,并且只能使用内置下载 不会再调用downloadDelegate的原图下载方法。),default is NO */
Expand Down
3 changes: 2 additions & 1 deletion LFPhotoBrowserDEMO/LFPhotoBrowserDEMO/class/LFPhotoBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ -(id)initWithImageArray:(NSArray *)imageArray
self.coverViewColor = [UIColor clearColor];
self.maskPosition = MaskPosition_Middle;
self.slideRange = 2;
self.pullDownDistance = 10.0;
self.batchDLHash = [NSHashTable weakObjectsHashTable];
_globalSerialQueue = dispatch_queue_create("LFPhotoBrowser.SerialQueue", NULL);
}
Expand Down Expand Up @@ -982,7 +983,7 @@ -(void)panGesture:(id)sender
if (_isPullBegan && _isPulling) { /** 有触发滑动情况 */
_isPullBegan = NO;
_isPulling = NO;
if(currFrame.size.width > self.currPhotoView.frame.size.width * 0.75)
if(self.currPhotoView.frame.size.width - currFrame.size.width < self.pullDownDistance)
{
_isStatusBarHiden = YES;
CGRect currRect = (CGRect){CGPointZero, self.currPhotoView.bounds.size};
Expand Down

0 comments on commit 154d5b8

Please sign in to comment.