Commit fdb67b04a2707f952929cb536c0ea26f56d98bf8
1 parent
079680ca
提取分类遗留管理类
Showing
13 changed files
with
179 additions
and
118 deletions
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.30' | |
| 11 | + s.version = '0.0.31' | |
| 12 | 12 | s.summary = '视讯头部一二级菜单组件' |
| 13 | 13 | |
| 14 | 14 | # This description is used to generate tags and improve search results. |
| ... | ... | @@ -42,12 +42,14 @@ Pod::Spec.new do |s| |
| 42 | 42 | s.frameworks = 'UIKit', 'MapKit' |
| 43 | 43 | s.dependency 'JXCategoryView' |
| 44 | 44 | s.dependency 'CNLiveNewTripartiteManagement/MJExtension' |
| 45 | + s.dependency 'CNLiveNewTripartiteManagement/MJRefresh' | |
| 45 | 46 | s.dependency 'CNLiveBaseKit' |
| 46 | 47 | s.dependency 'CNLiveCategory' |
| 47 | 48 | s.dependency 'CNLiveUserManagement' |
| 48 | 49 | s.dependency 'CNLiveCommonCategory' |
| 49 | 50 | s.dependency 'CNLiveBeeHive' |
| 50 | 51 | s.dependency 'CNLiveEnvironment' |
| 52 | + s.dependency 'CNLiveCustomControl' | |
| 51 | 53 | s.dependency 'UMCCommon' |
| 52 | 54 | s.dependency 'CNLiveNewTripartiteManagement/SDWebImage' |
| 53 | 55 | s.dependency 'CNLiveNewTripartiteManagement/Masonry' | ... | ... |
CNLiveVideoClassifyKit/Assets/CNSegmentControl.bundle/backWhite@2x.png
0 → 100644
2.03 KB
CNLiveVideoClassifyKit/Assets/CNSegmentControl.bundle/backWhite@3x.png
0 → 100644
2.28 KB
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNCategoryBaseViewController.m
| ... | ... | @@ -30,12 +30,6 @@ |
| 30 | 30 | self.categoryView.frame = CGRectMake(0, kStatusHeight, self.view.bounds.size.width, [self preferredCategoryViewHeight]); |
| 31 | 31 | self.listContainerView.frame = CGRectMake(0, [self preferredCategoryViewHeight], self.view.bounds.size.width, self.view.bounds.size.height); |
| 32 | 32 | } |
| 33 | --(void)viewWillAppear:(BOOL)animated | |
| 34 | -{ | |
| 35 | - [super viewWillAppear:animated]; | |
| 36 | - self.navigationController.navigationBarHidden = YES; | |
| 37 | - | |
| 38 | -} | |
| 39 | 33 | |
| 40 | 34 | #pragma mark - Public |
| 41 | 35 | - (void)categoryViewSelectedItemAtIndex:(NSInteger)index | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveClassifySegmentController.m
| ... | ... | @@ -174,7 +174,7 @@ static const CGFloat animationHeight = 15; |
| 174 | 174 | [[NSNotificationCenter defaultCenter] postNotificationName:kCNLiveDeepLinkPushNotification object:nil]; |
| 175 | 175 | [[NSNotificationCenter defaultCenter] postNotificationName:kCNLiveRemotePushNotification object:nil]; |
| 176 | 176 | } |
| 177 | - self.navigationController.navigationBar.hidden = YES; | |
| 177 | + self.navigationController.navigationBarHidden = YES; | |
| 178 | 178 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:CNLiveLaunchWithFirsh]; |
| 179 | 179 | [[NSUserDefaults standardUserDefaults] synchronize]; |
| 180 | 180 | self.tabBarController.tabBar.hidden = NO; |
| ... | ... | @@ -756,13 +756,17 @@ static const CGFloat animationHeight = 15; |
| 756 | 756 | NSDictionary *dic = CNLiveStringJsonToDictionary(dataStr); |
| 757 | 757 | CNCategoryGetChannelModel *model = [CNCategoryGetChannelModel mj_objectWithKeyValues:dic]; |
| 758 | 758 | NSDictionary *paramDic = nil; |
| 759 | + BOOL isBlack = NO; | |
| 760 | + if (CNLiveStringIsEmpty(model.statusBarColor)) { | |
| 761 | + isBlack = YES; | |
| 762 | + } else { | |
| 763 | + isBlack = [model.statusBarColor boolValue];//1 黑色 | |
| 764 | + } | |
| 759 | 765 | if (model.pageStyleList.count>0) { |
| 760 | - paramDic = @{ | |
| 761 | - @"showName":model.showName?model.showName:@"", | |
| 762 | - @"backgroundColor":model.backgroundColor?model.backgroundColor:@"", | |
| 763 | - @"index":@(index) | |
| 764 | - }; | |
| 765 | - [CNLiveClassifyJumpBridge showViewOrPushVCWithCurrentVC:self pushType:CNLiveClassifyJumpPushOtherSegmentVC pageType:model.pageType.integerValue param:paramDic]; | |
| 766 | + CNLiveSubSegmentController *subVC = [[CNLiveSubSegmentController alloc] initWithModel:model]; | |
| 767 | + subVC.showType = CNLiveSubVCShowtypeChannel; | |
| 768 | + subVC.isBlack = isBlack; | |
| 769 | + [self.navigationController pushViewController:subVC animated:YES]; | |
| 766 | 770 | |
| 767 | 771 | }else{ |
| 768 | 772 | if([model.pageType isEqualToString:@"4"] || [model.pageType isEqualToString:@"5"]){ |
| ... | ... | @@ -828,6 +832,7 @@ static const CGFloat animationHeight = 15; |
| 828 | 832 | if (model.pageStyleList.count>0) { |
| 829 | 833 | self.topBgImg.frame = CGRectMake(0, 0, KScreenWidth, self.topBgImgHeight); |
| 830 | 834 | CNLiveSubSegmentController *subVC = [[CNLiveSubSegmentController alloc] initWithModel:model]; |
| 835 | + subVC.showType = CNLiveSubVCShowtypeClassify; | |
| 831 | 836 | subVC.isBlack = isBlack; |
| 832 | 837 | subVC.delegate = self; |
| 833 | 838 | if (index == self.isLoginIndex) { |
| ... | ... | @@ -856,6 +861,8 @@ static const CGFloat animationHeight = 15; |
| 856 | 861 | } |
| 857 | 862 | if (model.pageStyleList.count>0) { |
| 858 | 863 | CNLiveSubSegmentController *subVC = (CNLiveSubSegmentController *)self.listContainerView.validListDict[@(index)]; |
| 864 | + subVC.showType = CNLiveSubVCShowtypeClassify; | |
| 865 | + | |
| 859 | 866 | if (subVC && [subVC respondsToSelector:@selector(refreshCurrentVCData)]) { |
| 860 | 867 | [subVC refreshCurrentVCData]; |
| 861 | 868 | } | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.m
| ... | ... | @@ -76,13 +76,17 @@ |
| 76 | 76 | [self.view addSubview:subVC.view]; |
| 77 | 77 | [self addChildViewController:subVC]; |
| 78 | 78 | [subVC didMoveToParentViewController:self]; |
| 79 | - //调用当前vc的刷新功能获取数据 | |
| 80 | - [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time]; | |
| 79 | +// //调用当前vc的刷新功能获取数据 | |
| 80 | +// [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time]; | |
| 81 | 81 | //监听滑动下拉刷新 |
| 82 | 82 | UIViewController *vc = self.childViewControllers[0]; |
| 83 | 83 | if (([CNLiveListController searchProperties:[vc class] string:@"webView"]||[CNLiveListController searchProperties:[vc.superclass class] string:@"webView"])&&[vc valueForKey:@"webView"]&&[[vc valueForKey:@"webView"] isKindOfClass:[WKWebView class]]) { |
| 84 | 84 | WKWebView *webView = (WKWebView *)[vc valueForKey:@"webView"]; |
| 85 | 85 | [webView.scrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil]; |
| 86 | + if (!self.isLoading) { | |
| 87 | + [webView.scrollView.mj_header beginRefreshing]; | |
| 88 | + } | |
| 89 | + | |
| 86 | 90 | if ([webView.scrollView valueForKey:@"mj_header"]) { |
| 87 | 91 | id header = [webView.scrollView valueForKey:@"mj_header"]; |
| 88 | 92 | [header addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil]; |
| ... | ... | @@ -91,6 +95,9 @@ |
| 91 | 95 | }else if ([CNLiveListController searchProperties:[vc class] string:@"collectionView"]&&[vc valueForKey:@"collectionView"] && [[vc valueForKey:@"collectionView"] isKindOfClass:[UICollectionView class]]){ |
| 92 | 96 | UICollectionView *collectionView = (UICollectionView *)[vc valueForKey:@"collectionView"]; |
| 93 | 97 | [collectionView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil]; |
| 98 | + if (!self.isLoading) { | |
| 99 | + [collectionView.mj_header beginRefreshing]; | |
| 100 | + } | |
| 94 | 101 | if ([collectionView valueForKey:@"mj_header"]) { |
| 95 | 102 | id header = [collectionView valueForKey:@"mj_header"]; |
| 96 | 103 | [header addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil]; | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveSubSegmentController.h
| ... | ... | @@ -14,12 +14,16 @@ NS_ASSUME_NONNULL_BEGIN |
| 14 | 14 | - (void)showGuideShadeViewWithType:(NSInteger)type cellFrame:(CGRect)cellFrame; |
| 15 | 15 | |
| 16 | 16 | @end |
| 17 | - | |
| 17 | +typedef NS_ENUM(NSInteger , CNLiveSubVCShowtype) { | |
| 18 | + CNLiveSubVCShowtypeChannel, //频道管理器进入 | |
| 19 | + CNLiveSubVCShowtypeClassify, //频道选择器展示 | |
| 20 | +}; | |
| 18 | 21 | |
| 19 | 22 | @interface CNLiveSubSegmentController : CNCategoryBaseViewController<JXCategoryListContentViewDelegate> |
| 20 | 23 | |
| 21 | 24 | @property (nonatomic, assign) BOOL isBlack; |
| 22 | 25 | @property (nonatomic, assign) NSInteger selectChannelId; |
| 26 | +@property (nonatomic, assign) CNLiveSubVCShowtype showType; | |
| 23 | 27 | @property (nonatomic, weak) id <CNSubClassifySegmentControllerDelegate>delegate; |
| 24 | 28 | |
| 25 | 29 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model; | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveSubSegmentController.m
| ... | ... | @@ -12,6 +12,8 @@ |
| 12 | 12 | |
| 13 | 13 | @interface CNLiveSubSegmentController () |
| 14 | 14 | @property (nonatomic, strong)JXCategoryTitleView *myCategoryView; |
| 15 | + | |
| 16 | +@property (nonatomic, strong) CNLiveNavigationBar *navigationBar; | |
| 15 | 17 | @property (nonatomic, strong) QMUIButton *searchBtn; |
| 16 | 18 | @property (nonatomic, strong) UIButton *moreBtn; |
| 17 | 19 | @property (nonatomic, strong) UIImageView *bgImgView;//背景图 |
| ... | ... | @@ -60,7 +62,7 @@ |
| 60 | 62 | self.backImageH5 = model.backgroundImgH5; |
| 61 | 63 | self.backImage = model.backgroundImg; |
| 62 | 64 | self.channelId = model.id; |
| 63 | - | |
| 65 | + self.title = model.showName; | |
| 64 | 66 | self.ld_currentIndex = 0; |
| 65 | 67 | self.selectChannelId = -1; |
| 66 | 68 | } |
| ... | ... | @@ -77,7 +79,11 @@ |
| 77 | 79 | weakself |
| 78 | 80 | [self.bgImgView sd_setImageWithURL:[NSURL URLWithString:self.backImageH5] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| 79 | 81 | if (image) { |
| 80 | - weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width; | |
| 82 | + if (self.showType == CNLiveSubVCShowtypeChannel) { | |
| 83 | + weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width + 50; | |
| 84 | + }else{ | |
| 85 | + weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width; | |
| 86 | + } | |
| 81 | 87 | } |
| 82 | 88 | }]; |
| 83 | 89 | } |
| ... | ... | @@ -101,10 +107,7 @@ |
| 101 | 107 | } |
| 102 | 108 | } |
| 103 | 109 | |
| 104 | - // 添加二级频道右侧的搜索按钮 | |
| 105 | - [self.view addSubview:self.searchBtn]; | |
| 106 | 110 | self.view.backgroundColor = [UIColor clearColor]; |
| 107 | - self.listContainerView.scrollView.scrollEnabled = NO; | |
| 108 | 111 | self.myCategoryView.titles = self.titles; |
| 109 | 112 | if (CNLiveStringIsEmpty(self.backImage)) { |
| 110 | 113 | self.view.backgroundColor = CNLiveColorWithHexString(self.backgroundColor); |
| ... | ... | @@ -123,73 +126,71 @@ |
| 123 | 126 | self.ld_currentIndex = 0; |
| 124 | 127 | } |
| 125 | 128 | self.categoryView.defaultSelectedIndex = self.ld_currentIndex; |
| 126 | - | |
| 127 | - if ([self.channelId isEqualToString:@"219"]) { | |
| 128 | - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updatePlayingStatus:) name:WjjAudioPlayerStatusNotification object:nil]; | |
| 129 | - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updatePlayingSchedule:) name:WjjAudioPlayerScheduleNotification object:nil]; | |
| 130 | - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioPlayFinishedUpdateSchedule:) name:WjjAudioPlayDidFinishNotification object:nil]; | |
| 131 | - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioPlayUpdateInfo:) name:WjjAudioPlayerWhichPlayingNotification object:nil]; | |
| 132 | - | |
| 133 | - [self.view addSubview:self.moreBtn]; | |
| 134 | - [self.view addSubview:self.progressView]; | |
| 135 | - [self.progressView addSubview:self.playingImgV]; | |
| 136 | - [self.playingImgV addSubview:self.playTipImgV]; | |
| 137 | - [self.progressView addSubview:self.playingBtn]; | |
| 138 | - YYCache * yyCache = [YYCache cacheWithName:[NSString stringWithFormat:@"CNLastPlayedAudio_%@",CNUserShareModel.uid]]; | |
| 139 | - CNLiveAlbumAudioListModelModule *model = (CNLiveAlbumAudioListModelModule *)[yyCache objectForKey:[NSString stringWithFormat:@"%@_%@",wjjLastAudioInfoSaveKey,CNUserShareModel.uid]]; | |
| 140 | - if (model) { | |
| 141 | - if (model && !CNLiveStringIsEmpty(model.activityId)) { | |
| 142 | - self.playingBtn.userInteractionEnabled = YES; | |
| 143 | - self.progressView.hidden = NO; | |
| 144 | - } else { | |
| 145 | - self.playingBtn.userInteractionEnabled = NO; | |
| 146 | - self.progressView.hidden = YES; | |
| 147 | - } | |
| 148 | - if (model && (!CNLiveStringIsEmpty(model.img) || !CNLiveStringIsEmpty(model.poster) || !CNLiveStringIsEmpty(model.albumImg)) ) { | |
| 149 | - [self.playingImgV sd_setImageWithURL:[NSURL URLWithString:model.img?[model.img stringByRemovingPercentEncoding]:(model.poster?[model.poster stringByRemovingPercentEncoding]:[model.albumImg stringByRemovingPercentEncoding])] placeholderImage:[UIImage loadBundleImage:@""]]; | |
| 150 | - } else { | |
| 151 | - self.playingImgV.image = nil; | |
| 152 | - } | |
| 129 | + if (self.showType == CNLiveSubVCShowtypeClassify) { | |
| 130 | + self.listContainerView.scrollView.scrollEnabled = NO; | |
| 131 | + // 添加二级频道右侧的搜索按钮 | |
| 132 | + [self.view addSubview:self.searchBtn]; | |
| 133 | + if ([self.channelId isEqualToString:@"219"]) { | |
| 134 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updatePlayingStatus:) name:WjjAudioPlayerStatusNotification object:nil]; | |
| 135 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updatePlayingSchedule:) name:WjjAudioPlayerScheduleNotification object:nil]; | |
| 136 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioPlayFinishedUpdateSchedule:) name:WjjAudioPlayDidFinishNotification object:nil]; | |
| 137 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioPlayUpdateInfo:) name:WjjAudioPlayerWhichPlayingNotification object:nil]; | |
| 153 | 138 | |
| 154 | - if ([CNLiveClassifyJumpBridge audioPlayerIsplaying]) { | |
| 155 | - self.playTipImgV.hidden = YES; | |
| 156 | - [self playingStartAnimating]; | |
| 157 | - } else { | |
| 158 | - self.playTipImgV.hidden = NO; | |
| 159 | - [self playingStopAnimating]; | |
| 139 | + [self.view addSubview:self.moreBtn]; | |
| 140 | + [self.view addSubview:self.progressView]; | |
| 141 | + [self.progressView addSubview:self.playingImgV]; | |
| 142 | + [self.playingImgV addSubview:self.playTipImgV]; | |
| 143 | + [self.progressView addSubview:self.playingBtn]; | |
| 144 | + YYCache * yyCache = [YYCache cacheWithName:[NSString stringWithFormat:@"CNLastPlayedAudio_%@",CNUserShareModel.uid]]; | |
| 145 | + CNLiveAlbumAudioListModelModule *model = (CNLiveAlbumAudioListModelModule *)[yyCache objectForKey:[NSString stringWithFormat:@"%@_%@",wjjLastAudioInfoSaveKey,CNUserShareModel.uid]]; | |
| 146 | + if (model) { | |
| 147 | + if (model && !CNLiveStringIsEmpty(model.activityId)) { | |
| 148 | + self.playingBtn.userInteractionEnabled = YES; | |
| 149 | + self.progressView.hidden = NO; | |
| 150 | + } else { | |
| 151 | + self.playingBtn.userInteractionEnabled = NO; | |
| 152 | + self.progressView.hidden = YES; | |
| 153 | + } | |
| 154 | + if (model && (!CNLiveStringIsEmpty(model.img) || !CNLiveStringIsEmpty(model.poster) || !CNLiveStringIsEmpty(model.albumImg)) ) { | |
| 155 | + [self.playingImgV sd_setImageWithURL:[NSURL URLWithString:model.img?[model.img stringByRemovingPercentEncoding]:(model.poster?[model.poster stringByRemovingPercentEncoding]:[model.albumImg stringByRemovingPercentEncoding])] placeholderImage:[UIImage loadBundleImage:@""]]; | |
| 156 | + } else { | |
| 157 | + self.playingImgV.image = nil; | |
| 158 | + } | |
| 159 | + | |
| 160 | + if ([CNLiveClassifyJumpBridge audioPlayerIsplaying]) { | |
| 161 | + self.playTipImgV.hidden = YES; | |
| 162 | + [self playingStartAnimating]; | |
| 163 | + } else { | |
| 164 | + self.playTipImgV.hidden = NO; | |
| 165 | + [self playingStopAnimating]; | |
| 166 | + } | |
| 160 | 167 | } |
| 168 | + }else if ([self.channelId isEqualToString:@"11"]) { | |
| 169 | + // 美食中国 历史记录 | |
| 170 | + [self.view addSubview:self.historyBtn]; | |
| 161 | 171 | } |
| 162 | - }else if ([self.channelId isEqualToString:@"11"]) { | |
| 163 | - // 美食中国 历史记录 | |
| 164 | - [self.view addSubview:self.historyBtn]; | |
| 165 | - } | |
| 166 | - | |
| 167 | - self.myCategoryView.top = 0; | |
| 168 | - self.searchBtn.right = KScreenWidth-12; | |
| 169 | - CGFloat width = self.searchBtn.left; | |
| 170 | - self.searchBtn.centerY = self.myCategoryView.height/2; | |
| 171 | - if ([self.channelId isEqualToString:@"219"]) { | |
| 172 | - self.moreBtn.right = KScreenWidth-12-66-15; | |
| 173 | - self.moreBtn.centerY = self.myCategoryView.height/2; | |
| 174 | - self.progressView.right = KScreenWidth-93-18-15; | |
| 175 | - self.progressView.centerY = self.myCategoryView.height/2; | |
| 176 | - width = self.progressView.left; | |
| 177 | - }else if ([self.channelId isEqualToString:@"11"]){ | |
| 178 | - self.historyBtn.right = KScreenWidth-93; | |
| 179 | - self.historyBtn.centerY = self.myCategoryView.height/2; | |
| 180 | - width = self.historyBtn.left; | |
| 172 | + | |
| 173 | + weakself | |
| 174 | + [CNLiveListManager shareListManager].scrollViewDidScrollBlock = ^(BOOL isUp) { | |
| 175 | + !weakSelf.scrollViewDidScrollBlock ?: weakSelf.scrollViewDidScrollBlock(isUp); | |
| 176 | + }; | |
| 177 | + }else{ | |
| 178 | + [self.view addSubview:self.navigationBar]; | |
| 179 | + self.bgImgView.top = 0; | |
| 180 | + self.listContainerView.scrollView.scrollEnabled = YES; | |
| 181 | 181 | } |
| 182 | - self.myCategoryView.width = width; | |
| 183 | - weakself | |
| 184 | - [CNLiveListManager shareListManager].scrollViewDidScrollBlock = ^(BOOL isUp) { | |
| 185 | - !weakSelf.scrollViewDidScrollBlock ?: weakSelf.scrollViewDidScrollBlock(isUp); | |
| 186 | - }; | |
| 182 | + | |
| 187 | 183 | // Do any additional setup after loading the view. |
| 188 | 184 | } |
| 189 | 185 | -(void)viewDidLayoutSubviews |
| 190 | 186 | { |
| 191 | 187 | [super viewDidLayoutSubviews]; |
| 192 | - self.myCategoryView.top = 0; | |
| 188 | + if (self.showType == CNLiveSubVCShowtypeChannel) { | |
| 189 | + self.myCategoryView.top = kNavigationBarHeight; | |
| 190 | + }else{ | |
| 191 | + self.myCategoryView.top = 0; | |
| 192 | + } | |
| 193 | + | |
| 193 | 194 | self.listContainerView.frame = CGRectMake(0, self.myCategoryView.bottom+10, kScreenWidth, self.view.bounds.size.height - self.myCategoryView.bottom); |
| 194 | 195 | self.searchBtn.right = KScreenWidth-12; |
| 195 | 196 | CGFloat width = self.searchBtn.left; |
| ... | ... | @@ -207,6 +208,16 @@ |
| 207 | 208 | } |
| 208 | 209 | self.myCategoryView.width = width-10; |
| 209 | 210 | } |
| 211 | + | |
| 212 | +- (void)viewWillAppear:(BOOL)animated | |
| 213 | +{ | |
| 214 | + [super viewWillAppear:animated]; | |
| 215 | + self.navigationController.navigationBarHidden = YES; | |
| 216 | +} | |
| 217 | +- (void)viewWillDisappear:(BOOL)animated | |
| 218 | +{ | |
| 219 | + [super viewWillDisappear:animated]; | |
| 220 | +} | |
| 210 | 221 | #pragma mark - Notification |
| 211 | 222 | - (void)updatePlayingStatus:(NSNotification *)notifi { |
| 212 | 223 | |
| ... | ... | @@ -348,7 +359,11 @@ |
| 348 | 359 | weakself |
| 349 | 360 | [self.bgImgView sd_setImageWithURL:[NSURL URLWithString:self.backImageH5] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| 350 | 361 | if (image) { |
| 351 | - weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width; | |
| 362 | + if (self.showType == CNLiveSubVCShowtypeChannel) { | |
| 363 | + weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width + 50; | |
| 364 | + }else{ | |
| 365 | + weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width; | |
| 366 | + } | |
| 352 | 367 | } |
| 353 | 368 | }]; |
| 354 | 369 | CNCategoryGetChannelModel *model = (CNCategoryGetChannelModel *)[self.pageListArr wjj_safetyObjectAtIndex:self.ld_currentIndex]; |
| ... | ... | @@ -551,7 +566,11 @@ |
| 551 | 566 | weakself |
| 552 | 567 | [self.bgImgView sd_setImageWithURL:[NSURL URLWithString:self.backImageH5] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| 553 | 568 | if (image) { |
| 554 | - weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width; | |
| 569 | + if (self.showType == CNLiveSubVCShowtypeChannel) { | |
| 570 | + weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width + 50; | |
| 571 | + }else{ | |
| 572 | + weakSelf.bgImgView.height = KScreenWidth*image.size.height/image.size.width; | |
| 573 | + } | |
| 555 | 574 | } |
| 556 | 575 | }]; |
| 557 | 576 | } |
| ... | ... | @@ -658,14 +677,26 @@ |
| 658 | 677 | } |
| 659 | 678 | return _moreBtn; |
| 660 | 679 | } |
| 661 | -/* | |
| 662 | 680 | #pragma mark - Navigation |
| 663 | 681 | |
| 664 | -// In a storyboard-based application, you will often want to do a little preparation before navigation | |
| 665 | -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
| 666 | - // Get the new view controller using [segue destinationViewController]. | |
| 667 | - // Pass the selected object to the new view controller. | |
| 682 | +- (CNLiveNavigationBar *)navigationBar { | |
| 683 | + if (!_navigationBar) { | |
| 684 | + _navigationBar = [CNLiveNavigationBar navigationBar]; | |
| 685 | + _navigationBar.lineHidden = YES; | |
| 686 | + _navigationBar.backgroundColor = [UIColor clearColor]; | |
| 687 | + _navigationBar.title.text = self.title; | |
| 688 | + _navigationBar.title.textColor = self.textColor; | |
| 689 | + if (!self.isBlack) { | |
| 690 | + _navigationBar.leftImage = [UIImage loadBundleImage:@"backWhite"]; | |
| 691 | + } | |
| 692 | + weakself | |
| 693 | + _navigationBar.onClickLeftButton = ^{ | |
| 694 | + strongself | |
| 695 | + [self.navigationController popViewControllerAnimated:YES]; | |
| 696 | + }; | |
| 697 | + } | |
| 698 | + return _navigationBar; | |
| 668 | 699 | } |
| 669 | -*/ | |
| 700 | + | |
| 670 | 701 | |
| 671 | 702 | @end | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Header/CNLivevideoClassifyPCH.h
| ... | ... | @@ -20,8 +20,10 @@ |
| 20 | 20 | #import <CNLiveCommonCategory/UIColor+CNLiveExtension.h> |
| 21 | 21 | #import <CNLiveBeeHive/BHConfig.h> |
| 22 | 22 | #import <CNLiveEnvironment/CNLiveEnvironment.h> |
| 23 | +#import <CNLiveCustomControl/CNLiveNavigationBar.h> | |
| 23 | 24 | #import <MJExtension/MJExtension.h> |
| 24 | 25 | //#import <UMCommon/MobClick.h> |
| 26 | +#import <MJRefresh/MJRefresh.h> | |
| 25 | 27 | #import "CNLiveCommonDefines.h" |
| 26 | 28 | #import <QMUIKit/QMUIKit.h> |
| 27 | 29 | #import "UIImage+AdBundleImage.h" | ... | ... |
Example/CNLiveVideoClassifyKit.xcodeproj/project.pbxproj
| ... | ... | @@ -383,6 +383,7 @@ |
| 383 | 383 | "${BUILT_PRODUCTS_DIR}/CNLiveCWebViewModule/CNLiveCWebViewModule.framework", |
| 384 | 384 | "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework", |
| 385 | 385 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", |
| 386 | + "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework", | |
| 386 | 387 | "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework", |
| 387 | 388 | "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", |
| 388 | 389 | "${BUILT_PRODUCTS_DIR}/CNLiveNewTripartiteManagement/CNLiveNewTripartiteManagement.framework", |
| ... | ... | @@ -415,6 +416,7 @@ |
| 415 | 416 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCWebViewModule.framework", |
| 416 | 417 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework", |
| 417 | 418 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", |
| 419 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework", | |
| 418 | 420 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework", |
| 419 | 421 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", |
| 420 | 422 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveNewTripartiteManagement.framework", | ... | ... |
Example/CNLiveVideoClassifyKit/CNLIVEDemoViewController.m
Example/CNLiveVideoClassifyKit/CNLIVEViewController.m
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | -(void)viewDidAppear:(BOOL)animated |
| 51 | 51 | { |
| 52 | 52 | [super viewDidAppear:animated]; |
| 53 | - self.navigationController.navigationBarHidden = YES; | |
| 53 | + self.navigationController.navigationBarHidden = NO; | |
| 54 | 54 | } |
| 55 | 55 | #pragma mrk - UICollectionViewDataSource |
| 56 | 56 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section | ... | ... |
Example/Podfile.lock
| ... | ... | @@ -39,16 +39,24 @@ PODS: |
| 39 | 39 | - CNLiveCommonCategory/ImageInBundle (= 0.5.2) |
| 40 | 40 | - CNLiveCommonCategory/ARC (0.5.2) |
| 41 | 41 | - CNLiveCommonCategory/ImageInBundle (0.5.2) |
| 42 | - - CNLiveCustomUI (0.5.6): | |
| 42 | + - CNLiveCustomControl (0.0.6): | |
| 43 | + - CNLiveCustomControl/Button (= 0.0.6) | |
| 44 | + - CNLiveCustomControl/NavigationBar (= 0.0.6) | |
| 45 | + - CNLiveCustomControl/WebView (= 0.0.6) | |
| 46 | + - CNLiveCustomControl/Button (0.0.6) | |
| 47 | + - CNLiveCustomControl/NavigationBar (0.0.6): | |
| 48 | + - CNLiveCategory | |
| 49 | + - CNLiveCustomControl/WebView (0.0.6) | |
| 50 | + - CNLiveCustomUI (0.5.7): | |
| 43 | 51 | - CNLiveBaseKit |
| 44 | 52 | - CNLiveBusinessTools |
| 45 | - - CNLiveCustomUI/CNLiveBasicsUI (= 0.5.6) | |
| 46 | - - CNLiveCustomUI/CNLiveContentToolTextView (= 0.5.6) | |
| 47 | - - CNLiveCustomUI/CNLiveCycleScrollView (= 0.5.6) | |
| 48 | - - CNLiveCustomUI/CNLiveGetImage (= 0.5.6) | |
| 49 | - - CNLiveCustomUI/CNLivePopView (= 0.5.6) | |
| 50 | - - CNLiveCustomUI/CNLiveRefresh (= 0.5.6) | |
| 51 | - - CNLiveCustomUI/CNLiveBasicsUI (0.5.6): | |
| 53 | + - CNLiveCustomUI/CNLiveBasicsUI (= 0.5.7) | |
| 54 | + - CNLiveCustomUI/CNLiveContentToolTextView (= 0.5.7) | |
| 55 | + - CNLiveCustomUI/CNLiveCycleScrollView (= 0.5.7) | |
| 56 | + - CNLiveCustomUI/CNLiveGetImage (= 0.5.7) | |
| 57 | + - CNLiveCustomUI/CNLivePopView (= 0.5.7) | |
| 58 | + - CNLiveCustomUI/CNLiveRefresh (= 0.5.7) | |
| 59 | + - CNLiveCustomUI/CNLiveBasicsUI (0.5.7): | |
| 52 | 60 | - CNLiveBaseKit |
| 53 | 61 | - CNLiveBusinessTools |
| 54 | 62 | - CNLiveCustomUI/CNLiveGetImage |
| ... | ... | @@ -63,28 +71,28 @@ PODS: |
| 63 | 71 | - CNLiveNewTripartiteManagement/YYModel |
| 64 | 72 | - CNLiveNewTripartiteManagement/YYText |
| 65 | 73 | - CNLiveNewTripartiteManagement/YYWebImage |
| 66 | - - CNLiveCustomUI/CNLiveContentToolTextView (0.5.6): | |
| 74 | + - CNLiveCustomUI/CNLiveContentToolTextView (0.5.7): | |
| 67 | 75 | - CNLiveBaseKit |
| 68 | 76 | - CNLiveBusinessTools |
| 69 | 77 | - CNLiveNewTripartiteManagement/Masonry |
| 70 | 78 | - CNLiveNewTripartiteManagement/QMUIKit |
| 71 | - - CNLiveCustomUI/CNLiveCycleScrollView (0.5.6): | |
| 79 | + - CNLiveCustomUI/CNLiveCycleScrollView (0.5.7): | |
| 72 | 80 | - CNLiveBaseKit |
| 73 | 81 | - CNLiveBusinessTools |
| 74 | 82 | - CNLiveNewTripartiteManagement/SDWebImage |
| 75 | - - CNLiveCustomUI/CNLiveGetImage (0.5.6): | |
| 83 | + - CNLiveCustomUI/CNLiveGetImage (0.5.7): | |
| 76 | 84 | - CNLiveBaseKit |
| 77 | 85 | - CNLiveBusinessTools |
| 78 | - - CNLiveCustomUI/CNLivePopView (0.5.6): | |
| 86 | + - CNLiveCustomUI/CNLivePopView (0.5.7): | |
| 79 | 87 | - CNLiveBaseKit |
| 80 | 88 | - CNLiveBusinessTools |
| 81 | 89 | - CNLiveNewTripartiteManagement/QMUIKit |
| 82 | - - CNLiveCustomUI/CNLiveRefresh (0.5.6): | |
| 90 | + - CNLiveCustomUI/CNLiveRefresh (0.5.7): | |
| 83 | 91 | - CNLiveBaseKit |
| 84 | 92 | - CNLiveBusinessTools |
| 85 | 93 | - CNLiveCustomUI/CNLiveGetImage |
| 86 | 94 | - CNLiveNewTripartiteManagement/MJRefresh |
| 87 | - - CNLiveCWebViewModule (0.0.15): | |
| 95 | + - CNLiveCWebViewModule (0.1.2): | |
| 88 | 96 | - CNLiveCustomUI |
| 89 | 97 | - CNLiveEnvironment |
| 90 | 98 | - CNLiveNewTripartiteManagement/Masonry |
| ... | ... | @@ -95,21 +103,21 @@ PODS: |
| 95 | 103 | - CNLiveUserManagement |
| 96 | 104 | - WebViewJavascriptBridge |
| 97 | 105 | - CNLiveEnvironment (0.3.3) |
| 98 | - - CNLiveNewTripartiteManagement/Masonry (0.2.0.5): | |
| 106 | + - CNLiveNewTripartiteManagement/Masonry (0.2.0.6): | |
| 99 | 107 | - Masonry (= 1.1.0) |
| 100 | - - CNLiveNewTripartiteManagement/MJExtension (0.2.0.5): | |
| 108 | + - CNLiveNewTripartiteManagement/MJExtension (0.2.0.6): | |
| 101 | 109 | - MJExtension (= 3.2.1) |
| 102 | 110 | - CNLiveNewTripartiteManagement/MJRefresh (0.2.0.6): |
| 103 | 111 | - MJRefresh (= 3.2.0) |
| 104 | - - CNLiveNewTripartiteManagement/QMUIKit (0.2.0.5): | |
| 112 | + - CNLiveNewTripartiteManagement/QMUIKit (0.2.0.6): | |
| 105 | 113 | - QMUIKit (= 4.2.1) |
| 106 | - - CNLiveNewTripartiteManagement/SDWebImage (0.2.0.5): | |
| 114 | + - CNLiveNewTripartiteManagement/SDWebImage (0.2.0.6): | |
| 107 | 115 | - SDWebImage (= 5.2.3) |
| 108 | 116 | - CNLiveNewTripartiteManagement/YYAsyncLayer (0.2.0.6): |
| 109 | 117 | - YYAsyncLayer (= 1.0) |
| 110 | - - CNLiveNewTripartiteManagement/YYCache (0.2.0.5): | |
| 118 | + - CNLiveNewTripartiteManagement/YYCache (0.2.0.6): | |
| 111 | 119 | - YYCache (= 1.0.4) |
| 112 | - - CNLiveNewTripartiteManagement/YYCategories (0.2.0.5): | |
| 120 | + - CNLiveNewTripartiteManagement/YYCategories (0.2.0.6): | |
| 113 | 121 | - YYCategories (= 1.0.4) |
| 114 | 122 | - CNLiveNewTripartiteManagement/YYDispatchQueuePool (0.2.0.6): |
| 115 | 123 | - YYDispatchQueuePool (= 1.0) |
| ... | ... | @@ -123,19 +131,21 @@ PODS: |
| 123 | 131 | - YYText (= 1.0.7) |
| 124 | 132 | - CNLiveNewTripartiteManagement/YYWebImage (0.2.0.6): |
| 125 | 133 | - YYWebImage (= 1.0.5) |
| 126 | - - CNLiveRequestBastKit (0.2.5.6): | |
| 134 | + - CNLiveRequestBastKit (0.2.5.7): | |
| 127 | 135 | - AFNetworking |
| 128 | 136 | - CNLiveSDK/CNLiveStat (0.3.4.8) |
| 129 | 137 | - CNLiveUserManagement (0.1.5): |
| 130 | 138 | - CNLiveNewTripartiteManagement/MJExtension |
| 131 | - - CNLiveVideoClassifyKit (0.0.23): | |
| 139 | + - CNLiveVideoClassifyKit (0.0.30): | |
| 132 | 140 | - CNLiveBaseKit |
| 133 | 141 | - CNLiveBeeHive |
| 134 | 142 | - CNLiveCategory |
| 135 | 143 | - CNLiveCommonCategory |
| 144 | + - CNLiveCustomControl | |
| 136 | 145 | - CNLiveEnvironment |
| 137 | 146 | - CNLiveNewTripartiteManagement/Masonry |
| 138 | 147 | - CNLiveNewTripartiteManagement/MJExtension |
| 148 | + - CNLiveNewTripartiteManagement/MJRefresh | |
| 139 | 149 | - CNLiveNewTripartiteManagement/QMUIKit |
| 140 | 150 | - CNLiveNewTripartiteManagement/SDWebImage |
| 141 | 151 | - CNLiveNewTripartiteManagement/YYCache |
| ... | ... | @@ -468,7 +478,7 @@ PODS: |
| 468 | 478 | - SDWebImage (5.2.3): |
| 469 | 479 | - SDWebImage/Core (= 5.2.3) |
| 470 | 480 | - SDWebImage/Core (5.2.3) |
| 471 | - - UMAPM (1.5.2) | |
| 481 | + - UMAPM (1.5.5) | |
| 472 | 482 | - UMCCommon (7.3.5): |
| 473 | 483 | - UMAPM |
| 474 | 484 | - UMDevice |
| ... | ... | @@ -504,6 +514,7 @@ SPEC REPOS: |
| 504 | 514 | - CNLiveBusinessTools |
| 505 | 515 | - CNLiveCategory |
| 506 | 516 | - CNLiveCommonCategory |
| 517 | + - CNLiveCustomControl | |
| 507 | 518 | - CNLiveCustomUI |
| 508 | 519 | - CNLiveCWebViewModule |
| 509 | 520 | - CNLiveEnvironment |
| ... | ... | @@ -545,14 +556,15 @@ SPEC CHECKSUMS: |
| 545 | 556 | CNLiveBusinessTools: dfd3270d885523be2599bdc3a95a416277682d0d |
| 546 | 557 | CNLiveCategory: c90a01af1e20cd89f47d4f551d47d2ddc9ca96f3 |
| 547 | 558 | CNLiveCommonCategory: 22c9842b31f2087803ae69e983b2c944fb80eae1 |
| 548 | - CNLiveCustomUI: 55057d1da8c3b6987d8b427ae251db1dc71a3a19 | |
| 549 | - CNLiveCWebViewModule: 27d1bbc10be19f90830a1671983d42eb4d34d7d8 | |
| 559 | + CNLiveCustomControl: a692e47171afb799cebc210a8e77c5a4ddfc2099 | |
| 560 | + CNLiveCustomUI: b704f07f5f734e45c06bda1877e67b5f9e5d3581 | |
| 561 | + CNLiveCWebViewModule: 1af1e2853cc1203dacad5a66e8215e62ede2bfc9 | |
| 550 | 562 | CNLiveEnvironment: 6af0a2f332b704ffdec67106b4ba044c7f8da371 |
| 551 | 563 | CNLiveNewTripartiteManagement: 29ddb2d23ee77bcd42ba5eaf5f1322ed37db5baa |
| 552 | - CNLiveRequestBastKit: c6ae13843ee0f96082c58230dc92c249edd6220f | |
| 564 | + CNLiveRequestBastKit: 9fe28913b94a0a072298eba3356f17b98ef0b6cd | |
| 553 | 565 | CNLiveSDK: 75bafaafbb8c09dcb4420adfe0f05130405b25e7 |
| 554 | 566 | CNLiveUserManagement: ead053f2d701b01ea8fb5f1da572be788f2dd3cf |
| 555 | - CNLiveVideoClassifyKit: 361be0bea9fa85e6d819e88f7a0d83565dce2253 | |
| 567 | + CNLiveVideoClassifyKit: 69256224dd4833a46653960b28576b9f42574e24 | |
| 556 | 568 | FWDebug: 5a20d089a300517153de1438d8128ad4c4690951 |
| 557 | 569 | JXCategoryView: 2ef9ecfd3735158d009ce02d1f29811aa822da65 |
| 558 | 570 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 |
| ... | ... | @@ -560,7 +572,7 @@ SPEC CHECKSUMS: |
| 560 | 572 | MJRefresh: ed450d6eb9d3346a2cb033ab7eb6de090aeef437 |
| 561 | 573 | QMUIKit: 15294d6a350466e4a6f4df0333eac5bff474f995 |
| 562 | 574 | SDWebImage: 46a7f73228f84ce80990c786e4372cf4db5875ce |
| 563 | - UMAPM: 163962b8a6ec1a10a3034468da070b28ca510d5b | |
| 575 | + UMAPM: 1ab13287a2b05c1d491009321270daddf5659a74 | |
| 564 | 576 | UMCCommon: 3c535e9e3958f72df075cc6fe4776fb5e403c8bc |
| 565 | 577 | UMDevice: c13bbb2e8ca6c67d1e23e03162553e3ec5a8b5b0 |
| 566 | 578 | WebViewJavascriptBridge: 7f5bc4d3581e672e8f32bd0f812d54bc69bb8e29 | ... | ... |