feat:step10

This commit is contained in:
pengfei.zhou 2019-11-27 18:07:31 +08:00
parent f78d2ad487
commit d8a743f13f
3 changed files with 12 additions and 2 deletions

View File

@ -109,5 +109,6 @@ class ListPanel extends Panel {
}
it.bgColor = Color.WHITE
}).in(rootView)
refreshView.bgColor = Color.YELLOW
}
}

View File

@ -102,6 +102,8 @@ class RefreshableDemo extends Panel {
} as IVLayout)).apply({
layoutConfig: layoutConfig().atmost(),
})
}).apply({
bgColor: Color.YELLOW
}).in(rootView)
}
}

View File

@ -18,6 +18,9 @@ - (instancetype)initWithFrame:(CGRect)frame {
self.showsVerticalScrollIndicator = NO;
self.alwaysBounceVertical = YES;
self.delegate = self;
if (@available(iOS 11, *)) {
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
}
return self;
}
@ -28,6 +31,9 @@ - (instancetype)init {
self.showsVerticalScrollIndicator = NO;
self.alwaysBounceVertical = YES;
self.delegate = self;
if (@available(iOS 11, *)) {
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
}
return self;
}
@ -80,9 +86,10 @@ - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView.contentOffset.y <= 0) {
[self.swipePullingDelegate setProgressRotation:-scrollView.contentOffset.y / self.headerView.height];
self.bounces = YES;
//self.bounces = YES;
} else {
self.bounces = NO;
//self.bounces = NO;
//scrollView.contentOffset = CGPointMake(scrollView.contentOffset.x, 0);
}
}