Commit 9803a00664937314efd177f4ecce878666fdd496
1 parent
8682845e
0.0.23
Showing
2 changed files
with
4 additions
and
3 deletions
CNLiveVideoClassifyKit.podspec
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.m
| ... | ... | @@ -136,10 +136,11 @@ |
| 136 | 136 | UIScrollView *scrollView = object; |
| 137 | 137 | NSValue *newValue = change[NSKeyValueChangeNewKey]; |
| 138 | 138 | CGFloat contentPointY = newValue.UIOffsetValue.vertical; |
| 139 | - if (contentPointY>self.contentOffetY&&contentPointY>0) { | |
| 139 | + CGFloat maxOffsetY = scrollView.contentSize.height-scrollView.height; | |
| 140 | + if (contentPointY>self.contentOffetY&&contentPointY > 0&&(contentPointY < maxOffsetY || maxOffsetY <= 0)) { | |
| 140 | 141 | [[CNLiveListManager shareListManager] firstHeaderUp:YES]; |
| 141 | 142 | self.contentOffetY = contentPointY; |
| 142 | - }else if (self.contentOffetY > contentPointY &&contentPointY<scrollView.contentSize.height-scrollView.height){ | |
| 143 | + }else if (self.contentOffetY > contentPointY && (maxOffsetY>0 ? contentPointY < maxOffsetY:contentPointY<0)){ | |
| 143 | 144 | self.contentOffetY = contentPointY; |
| 144 | 145 | [[CNLiveListManager shareListManager] firstHeaderUp:NO]; |
| 145 | 146 | } | ... | ... |