Commit 9803a00664937314efd177f4ecce878666fdd496
1 parent
8682845e
0.0.23
Showing
2 changed files
with
4 additions
and
3 deletions
CNLiveVideoClassifyKit.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveVideoClassifyKit' | 10 | s.name = 'CNLiveVideoClassifyKit' |
| 11 | - s.version = '0.0.22' | 11 | + s.version = '0.0.23' |
| 12 | s.summary = '视讯头部一二级菜单组件' | 12 | s.summary = '视讯头部一二级菜单组件' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.m
| @@ -136,10 +136,11 @@ | @@ -136,10 +136,11 @@ | ||
| 136 | UIScrollView *scrollView = object; | 136 | UIScrollView *scrollView = object; |
| 137 | NSValue *newValue = change[NSKeyValueChangeNewKey]; | 137 | NSValue *newValue = change[NSKeyValueChangeNewKey]; |
| 138 | CGFloat contentPointY = newValue.UIOffsetValue.vertical; | 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 | [[CNLiveListManager shareListManager] firstHeaderUp:YES]; | 141 | [[CNLiveListManager shareListManager] firstHeaderUp:YES]; |
| 141 | self.contentOffetY = contentPointY; | 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 | self.contentOffetY = contentPointY; | 144 | self.contentOffetY = contentPointY; |
| 144 | [[CNLiveListManager shareListManager] firstHeaderUp:NO]; | 145 | [[CNLiveListManager shareListManager] firstHeaderUp:NO]; |
| 145 | } | 146 | } |