Commit f6e4752abcff033ae4e1e38d5bb9f3d798b3b7dd
1 parent
0432b5fa
no message
Showing
2 changed files
with
2 additions
and
2 deletions
CNLiveVideoClassifyKit/Classes/Controller/CNLiveClassifySegmentController.m
| @@ -242,7 +242,6 @@ static CGFloat moveHeight = 50; | @@ -242,7 +242,6 @@ static CGFloat moveHeight = 50; | ||
| 242 | //分类控制器基础配置 | 242 | //分类控制器基础配置 |
| 243 | self.myCategoryView.titles = self.titles; | 243 | self.myCategoryView.titles = self.titles; |
| 244 | self.myCategoryView.imageURLs = self.imageNames; | 244 | self.myCategoryView.imageURLs = self.imageNames; |
| 245 | - self.myCategoryView.defaultSelectedIndex = self.ld_currentIndex; | ||
| 246 | self.myCategoryView.loadImageCallback = ^(UIImageView *imageView, NSURL *imageURL) { | 245 | self.myCategoryView.loadImageCallback = ^(UIImageView *imageView, NSURL *imageURL) { |
| 247 | [imageView sd_setImageWithURL:imageURL]; | 246 | [imageView sd_setImageWithURL:imageURL]; |
| 248 | }; | 247 | }; |
| @@ -424,6 +423,7 @@ static CGFloat moveHeight = 50; | @@ -424,6 +423,7 @@ static CGFloat moveHeight = 50; | ||
| 424 | } | 423 | } |
| 425 | -(void)updateSelectColors:(NSInteger)index | 424 | -(void)updateSelectColors:(NSInteger)index |
| 426 | { | 425 | { |
| 426 | + self.myCategoryView.defaultSelectedIndex = index; | ||
| 427 | NSString *backgroundImage = [self.bgImages safetyObjectAtIndex:index]; | 427 | NSString *backgroundImage = [self.bgImages safetyObjectAtIndex:index]; |
| 428 | weakself | 428 | weakself |
| 429 | [self.topBgImg sd_setImageWithURL:[NSURL URLWithString:backgroundImage] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { | 429 | [self.topBgImg sd_setImageWithURL:[NSURL URLWithString:backgroundImage] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| @@ -437,7 +437,6 @@ static CGFloat moveHeight = 50; | @@ -437,7 +437,6 @@ static CGFloat moveHeight = 50; | ||
| 437 | } | 437 | } |
| 438 | weakSelf.topBgImg.height = weakSelf.topBgImgHeight; | 438 | weakSelf.topBgImg.height = weakSelf.topBgImgHeight; |
| 439 | weakSelf.topBgImg.bottom = kStatusHeight+100; | 439 | weakSelf.topBgImg.bottom = kStatusHeight+100; |
| 440 | - weakSelf.myCategoryView.bottom = weakSelf.topBgImg.height-60; | ||
| 441 | }]; | 440 | }]; |
| 442 | NSString *backgroundColor = [self.bgColors safetyObjectAtIndex:index]; | 441 | NSString *backgroundColor = [self.bgColors safetyObjectAtIndex:index]; |
| 443 | self.topBgImg.backgroundColor = CNLiveColorWithHexString(backgroundColor); | 442 | self.topBgImg.backgroundColor = CNLiveColorWithHexString(backgroundColor); |
CNLiveVideoClassifyKit/Classes/Controller/CNLiveSubSegmentController.m
| @@ -517,6 +517,7 @@ | @@ -517,6 +517,7 @@ | ||
| 517 | -(void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index | 517 | -(void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index |
| 518 | { | 518 | { |
| 519 | self.navigationController.interactivePopGestureRecognizer.enabled = (index ==0); | 519 | self.navigationController.interactivePopGestureRecognizer.enabled = (index ==0); |
| 520 | + self.myCategoryView.defaultSelectedIndex = index; | ||
| 520 | UIViewController *vc = self.controllersArr[index]; | 521 | UIViewController *vc = self.controllersArr[index]; |
| 521 | if (index>self.ld_currentIndex) { | 522 | if (index>self.ld_currentIndex) { |
| 522 | [self.pageViewController setViewControllers:@[vc] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:NULL]; | 523 | [self.pageViewController setViewControllers:@[vc] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:NULL]; |