Commit c4bfaf2ce05d32d2a022b622aa6e1d6f2e545c7e
1 parent
641f5b24
添加注释
Showing
6 changed files
with
47 additions
and
18 deletions
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNCategoryBaseViewController.h
| @@ -11,14 +11,24 @@ NS_ASSUME_NONNULL_BEGIN | @@ -11,14 +11,24 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 11 | 11 | ||
| 12 | @interface CNCategoryBaseViewController : UIViewController<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate> | 12 | @interface CNCategoryBaseViewController : UIViewController<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate> |
| 13 | 13 | ||
| 14 | -@property (nonatomic, strong) JXCategoryBaseView *categoryView; | ||
| 15 | -@property (nonatomic, strong) JXCategoryListContainerView *listContainerView; | 14 | +@property (nonatomic, strong) JXCategoryBaseView *categoryView; //分类控制器 |
| 15 | +@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;//分类控制器对应VC管理器 | ||
| 16 | @property (nonatomic, strong) NSMutableArray *titles;//标题 | 16 | @property (nonatomic, strong) NSMutableArray *titles;//标题 |
| 17 | @property (nonatomic, assign) NSInteger ld_currentIndex; //当前选中 | 17 | @property (nonatomic, assign) NSInteger ld_currentIndex; //当前选中 |
| 18 | @property (nonatomic, assign)BOOL isHiddenFirst;//是否隐藏一级分类 | 18 | @property (nonatomic, assign)BOOL isHiddenFirst;//是否隐藏一级分类 |
| 19 | 19 | ||
| 20 | +/** | ||
| 21 | + 动态创建分类控制器类型类型 | ||
| 22 | + */ | ||
| 20 | -(JXCategoryBaseView *)preferredCategoryView; | 23 | -(JXCategoryBaseView *)preferredCategoryView; |
| 24 | +/** | ||
| 25 | + 返回当前分类控制器高度 | ||
| 26 | + */ | ||
| 21 | -(CGFloat)preferredCategoryViewHeight; | 27 | -(CGFloat)preferredCategoryViewHeight; |
| 28 | +/** | ||
| 29 | + 调用分类选择位置 | ||
| 30 | + @param index 选择位置 | ||
| 31 | + */ | ||
| 22 | - (void)categoryViewSelectedItemAtIndex:(NSInteger)index; | 32 | - (void)categoryViewSelectedItemAtIndex:(NSInteger)index; |
| 23 | @end | 33 | @end |
| 24 | 34 |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveClassifySegmentController.h
| @@ -10,10 +10,13 @@ | @@ -10,10 +10,13 @@ | ||
| 10 | NS_ASSUME_NONNULL_BEGIN | 10 | NS_ASSUME_NONNULL_BEGIN |
| 11 | 11 | ||
| 12 | @interface CNLiveClassifySegmentController : CNCategoryBaseViewController | 12 | @interface CNLiveClassifySegmentController : CNCategoryBaseViewController |
| 13 | -@property (nonatomic, assign) BOOL isLoad; | ||
| 14 | -@property (nonatomic, assign) NSInteger isLoginIndex; | 13 | +@property (nonatomic, assign) BOOL isLoad; //是否分类控制器加载完成 |
| 14 | +@property (nonatomic, assign) NSInteger isLoginIndex; //登录定位位置 | ||
| 15 | // 点击定制频道按钮进入定制 | 15 | // 点击定制频道按钮进入定制 |
| 16 | - (void)customAction:(UIButton *)sender; | 16 | - (void)customAction:(UIButton *)sender; |
| 17 | +/** | ||
| 18 | + 存储本地分类数据 | ||
| 19 | + */ | ||
| 17 | - (void)dataDivideIntoNormalAndOtherWithFirst:(BOOL)first; | 20 | - (void)dataDivideIntoNormalAndOtherWithFirst:(BOOL)first; |
| 18 | @end | 21 | @end |
| 19 | 22 |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.h
| @@ -11,6 +11,14 @@ | @@ -11,6 +11,14 @@ | ||
| 11 | NS_ASSUME_NONNULL_BEGIN | 11 | NS_ASSUME_NONNULL_BEGIN |
| 12 | 12 | ||
| 13 | @interface CNLiveListController : UIViewController<JXCategoryListContentViewDelegate> | 13 | @interface CNLiveListController : UIViewController<JXCategoryListContentViewDelegate> |
| 14 | +/** | ||
| 15 | + 创建View | ||
| 16 | + @param model 数据 | ||
| 17 | + @param black 文字颜色 | ||
| 18 | + @param bgImage 背景图 | ||
| 19 | + @param bgColor 背景色 | ||
| 20 | + @param bgImageH5 h5背景图 | ||
| 21 | + */ | ||
| 14 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model black:(BOOL)black bgImage:(NSString *)bgImage bgColor:(NSString *)bgColor bgImageH5:(NSString *)bgImageH5; | 22 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model black:(BOOL)black bgImage:(NSString *)bgImage bgColor:(NSString *)bgColor bgImageH5:(NSString *)bgImageH5; |
| 15 | @end | 23 | @end |
| 16 | 24 |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.m
| @@ -46,10 +46,12 @@ | @@ -46,10 +46,12 @@ | ||
| 46 | if ([_model.id isEqualToString:@"1"]) { | 46 | if ([_model.id isEqualToString:@"1"]) { |
| 47 | time = 60; | 47 | time = 60; |
| 48 | } | 48 | } |
| 49 | + //传入数据创建加载View | ||
| 49 | UIViewController *subVC = [CNLiveClassifyJumpBridge ListViewWithPageType:_model.pageType.integerValue param:_paramDic]; | 50 | UIViewController *subVC = [CNLiveClassifyJumpBridge ListViewWithPageType:_model.pageType.integerValue param:_paramDic]; |
| 50 | [self.view addSubview:subVC.view]; | 51 | [self.view addSubview:subVC.view]; |
| 51 | [self addChildViewController:subVC]; | 52 | [self addChildViewController:subVC]; |
| 52 | [subVC didMoveToParentViewController:self]; | 53 | [subVC didMoveToParentViewController:self]; |
| 54 | + //调用当前vc的刷新功能获取数据 | ||
| 53 | [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time]; | 55 | [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time]; |
| 54 | // Do any additional setup after loading the view. | 56 | // Do any additional setup after loading the view. |
| 55 | } | 57 | } |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveSubSegmentController.h
| @@ -25,7 +25,13 @@ NS_ASSUME_NONNULL_BEGIN | @@ -25,7 +25,13 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 25 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model; | 25 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model; |
| 26 | @property (nonatomic, copy) void (^scrollViewDidScrollBlock)(BOOL isUp); | 26 | @property (nonatomic, copy) void (^scrollViewDidScrollBlock)(BOOL isUp); |
| 27 | 27 | ||
| 28 | +/** | ||
| 29 | + 刷新二级分类 | ||
| 30 | + */ | ||
| 28 | - (void)refreshCurrentVCData; | 31 | - (void)refreshCurrentVCData; |
| 32 | +/** | ||
| 33 | + 显示引导说明图 | ||
| 34 | + */ | ||
| 29 | - (void)showGuideView; | 35 | - (void)showGuideView; |
| 30 | // 一级频道显示隐藏时二级频道右侧的搜索按钮变宽变窄控制 | 36 | // 一级频道显示隐藏时二级频道右侧的搜索按钮变宽变窄控制 |
| 31 | - (void)rightSubViewWithShow:(BOOL)show; | 37 | - (void)rightSubViewWithShow:(BOOL)show; |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Header/CNLiveCommonDefines.h
| @@ -9,20 +9,20 @@ | @@ -9,20 +9,20 @@ | ||
| 9 | #define CNLiveCommonDefines_h | 9 | #define CNLiveCommonDefines_h |
| 10 | 10 | ||
| 11 | typedef enum : NSUInteger { | 11 | typedef enum : NSUInteger { |
| 12 | - CNLiveClassifyJumpShowLoginView, | ||
| 13 | - CNLiveClassifyJumpShowGuideView, | ||
| 14 | - CNLiveClassifyJumpShowFuzzyView, | ||
| 15 | - CNLiveClassifyJumpPushShopSDKVC, | ||
| 16 | - CNLiveClassifyJumpPushAudioPlayerVC, | ||
| 17 | - CNLiveClassifyJumpPushLoginVC, | ||
| 18 | - CNLiveClassifyJumpPushHistoryVC, | ||
| 19 | - CNLiveClassifyJumpPushRecordVC, | ||
| 20 | - CNLiveClassifyJumpPushDownloadVC, | ||
| 21 | - CNLiveClassifyJumpPushSearchVC, | ||
| 22 | - CNLiveClassifyJumpPushAddDiviceVC, | ||
| 23 | - CNLiveClassifyJumpPushOtherSegmentVC, | ||
| 24 | - CNLiveClassifyJumpPushCustomVC, | ||
| 25 | - CNLiveClassifyJumpTypeDarenWebVC | 12 | + CNLiveClassifyJumpShowLoginView, //登录View展示 |
| 13 | + CNLiveClassifyJumpShowGuideView, //导航图展示 | ||
| 14 | + CNLiveClassifyJumpShowFuzzyView, //启动图 | ||
| 15 | + CNLiveClassifyJumpPushShopSDKVC, //跳转电商 | ||
| 16 | + CNLiveClassifyJumpPushAudioPlayerVC, //跳播放器 | ||
| 17 | + CNLiveClassifyJumpPushLoginVC, //登录页面 | ||
| 18 | + CNLiveClassifyJumpPushHistoryVC, //美食中国历史 | ||
| 19 | + CNLiveClassifyJumpPushRecordVC, //历史记录 | ||
| 20 | + CNLiveClassifyJumpPushDownloadVC, //下载 | ||
| 21 | + CNLiveClassifyJumpPushSearchVC, //搜索 | ||
| 22 | + CNLiveClassifyJumpPushAddDiviceVC, //添加设备 | ||
| 23 | + CNLiveClassifyJumpPushOtherSegmentVC, //其他频道控制器 | ||
| 24 | + CNLiveClassifyJumpPushCustomVC, //挑传VC | ||
| 25 | + CNLiveClassifyJumpTypeDarenWebVC //跳转webView | ||
| 26 | } CNLiveClassifyJumpType; | 26 | } CNLiveClassifyJumpType; |
| 27 | 27 | ||
| 28 | static NSString *const CNLiveLaunchWithFirsh = @"CNLiveLaunchWithFirsh"; | 28 | static NSString *const CNLiveLaunchWithFirsh = @"CNLiveLaunchWithFirsh"; |