Commit c4a6eb4fb4d939b5157b29319f064f8615b213ec

Authored by yanglingyu
1 parent 854436ad

修复组件积分跳转问题

CNLiveVideoClassifyKit.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveVideoClassifyKit'
11   - s.version = '0.0.18'
  11 + s.version = '0.0.19'
12 12 s.summary = '视讯头部一二级菜单组件'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveClassifySegmentController.m
... ... @@ -110,16 +110,10 @@ static CGFloat moveHeight = 50;
110 110 }
111 111 }
112 112 if ([CNWebRedirectHandle manager].isClickedIntegral) {
113   - [CNWebRedirectHandle manager].isClickedIntegral = NO;
114 113 self.ld_currentIndex = [CNWebRedirectHandle manager].channelId;
115   - NSNumber *key = @([CNWebRedirectHandle manager].classifyId);
116   - CNLiveSubSegmentController *svc = (CNLiveSubSegmentController *)self.listContainerView.validListDict[key];
117   - if([svc isKindOfClass:[CNLiveSubSegmentController class]]){
118   - //目击者 - 今日要闻 - 中国冰雪
119   - [svc categoryViewSelectedItemAtIndex:[CNWebRedirectHandle manager].classifyId];
120   - }
  114 +
121 115 [CNWebRedirectHandle manager].channelId = 0;
122   - [CNWebRedirectHandle manager].classifyId = 0;
  116 +
123 117 } else {
124 118  
125 119 if (!CNLiveStringIsEmpty(channelId)) {
... ... @@ -649,7 +643,7 @@ static CGFloat moveHeight = 50;
649 643 }
650 644  
651 645 -(void)scrollViewUp{
652   - self.topBgImg.top -= moveHeight;
  646 + self.topBgImg.bottom -= moveHeight;
653 647 self.myCategoryView.collectionView.top = -50-kStatusHeight;
654 648 self.listContainerView.top = kStatusHeight;
655 649 if ([CNUserShareManager isLogin]) {
... ... @@ -660,7 +654,7 @@ static CGFloat moveHeight = 50;
660 654 }
661 655 }
662 656 -(void)scrollViewDown{
663   - self.topBgImg.top += moveHeight;
  657 + self.topBgImg.bottom = kStatusHeight+100;
664 658 self.myCategoryView.top = kStatusHeight;
665 659 self.myCategoryView.collectionView.top = 0;
666 660 self.listContainerView.top = self.myCategoryView.bottom;
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.m
... ... @@ -47,10 +47,10 @@
47 47 time = 60;
48 48 }
49 49 UIViewController *subVC = [CNLiveClassifyJumpBridge ListViewWithPageType:_model.pageType.integerValue param:_paramDic];
50   - [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time];
51 50 [self.view addSubview:subVC.view];
52 51 [self addChildViewController:subVC];
53 52 [subVC didMoveToParentViewController:self];
  53 + [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time];
54 54 // Do any additional setup after loading the view.
55 55 }
56 56 -(void)viewDidLayoutSubviews
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveSubSegmentController.m
... ... @@ -82,7 +82,13 @@
82 82 }];
83 83 }
84 84 [self handleDateWithChannelsArray];
85   - if (self.selectChannelId != -1) {
  85 + if ([CNWebRedirectHandle manager].isClickedIntegral) {
  86 + [CNWebRedirectHandle manager].isClickedIntegral = NO;
  87 + self.ld_currentIndex = [CNWebRedirectHandle manager].classifyId;
  88 +
  89 +
  90 + [CNWebRedirectHandle manager].classifyId = 0;
  91 + }else if (self.selectChannelId != -1) {
86 92 NSString *classifyId = [BHConfig get:ChannelsSelectSecond];
87 93 [BHConfig set:ChannelsSelectSecond value:@""];
88 94 if (!CNLiveStringIsEmpty(classifyId)) {
... ... @@ -316,33 +322,25 @@
316 322 self.searchBtn.width = 66;
317 323 self.searchBtn.right = KScreenWidth-12;
318 324 [self.searchBtn setTitle:@"搜索" forState:UIControlStateNormal];
319   - CGFloat width = self.searchBtn.left;
320   - if ([self.channelId isEqualToString:@"219"]) {
321   - self.moreBtn.right = self.searchBtn.left - 15;
322   - self.progressView.right = self.moreBtn.left-15;
323   - width = self.progressView.left;
324   - } else if ([self.channelId isEqualToString:@"11"]) {
325   - self.historyBtn.right = self.searchBtn.left - 15;;
326   - width = self.historyBtn.left;
327   - }
328   -
329   - self.myCategoryView.width = width-10;
  325 +
330 326 } else {
331 327 // 变窄
332 328  
333 329 self.searchBtn.width = 30;
334 330 self.searchBtn.right = KScreenWidth-12;
335   - self.searchBtn.titleLabel.text = nil;
336 331 [self.searchBtn setTitle:nil forState:UIControlStateNormal];
337   -
338   - if ([self.channelId isEqualToString:@"219"]) {
339   - self.moreBtn.right = self.searchBtn.left - 15;
340   - self.progressView.right = self.moreBtn.left - 15;
341   - } else if ([self.channelId isEqualToString:@"11"]) {
342   - self.historyBtn.right = self.searchBtn.left - 15;
343   - }
344   - self.myCategoryView.width = self.searchBtn.left-10;
345 332 }
  333 + CGFloat width = self.searchBtn.left;
  334 + if ([self.channelId isEqualToString:@"219"]) {
  335 + self.moreBtn.right = self.searchBtn.left - 15;
  336 + self.progressView.right = self.moreBtn.left-15;
  337 + width = self.progressView.left;
  338 + } else if ([self.channelId isEqualToString:@"11"]) {
  339 + self.historyBtn.right = self.searchBtn.left - 15;;
  340 + width = self.historyBtn.left;
  341 + }
  342 +
  343 + self.myCategoryView.width = width-10;
346 344 }
347 345  
348 346 -(void)refreshCurrentVCData
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Manager/CNLiveListManager.m
... ... @@ -48,5 +48,9 @@
48 48 }
49 49 }
50 50 }
51   -
  51 +- (void)setIsHiddenFirst:(BOOL)isHiddenFirst
  52 +{
  53 + _isHiddenFirst = isHiddenFirst;
  54 + !self.scrollViewDidScrollBlock ?: self.scrollViewDidScrollBlock(isHiddenFirst);
  55 +}
52 56 @end
... ...