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 | 11 | |
| 12 | 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 | 16 | @property (nonatomic, strong) NSMutableArray *titles;//标题 |
| 17 | 17 | @property (nonatomic, assign) NSInteger ld_currentIndex; //当前选中 |
| 18 | 18 | @property (nonatomic, assign)BOOL isHiddenFirst;//是否隐藏一级分类 |
| 19 | 19 | |
| 20 | +/** | |
| 21 | + 动态创建分类控制器类型类型 | |
| 22 | + */ | |
| 20 | 23 | -(JXCategoryBaseView *)preferredCategoryView; |
| 24 | +/** | |
| 25 | + 返回当前分类控制器高度 | |
| 26 | + */ | |
| 21 | 27 | -(CGFloat)preferredCategoryViewHeight; |
| 28 | +/** | |
| 29 | + 调用分类选择位置 | |
| 30 | + @param index 选择位置 | |
| 31 | + */ | |
| 22 | 32 | - (void)categoryViewSelectedItemAtIndex:(NSInteger)index; |
| 23 | 33 | @end |
| 24 | 34 | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveClassifySegmentController.h
| ... | ... | @@ -10,10 +10,13 @@ |
| 10 | 10 | NS_ASSUME_NONNULL_BEGIN |
| 11 | 11 | |
| 12 | 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 | 16 | - (void)customAction:(UIButton *)sender; |
| 17 | +/** | |
| 18 | + 存储本地分类数据 | |
| 19 | + */ | |
| 17 | 20 | - (void)dataDivideIntoNormalAndOtherWithFirst:(BOOL)first; |
| 18 | 21 | @end |
| 19 | 22 | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.h
| ... | ... | @@ -11,6 +11,14 @@ |
| 11 | 11 | NS_ASSUME_NONNULL_BEGIN |
| 12 | 12 | |
| 13 | 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 | 22 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model black:(BOOL)black bgImage:(NSString *)bgImage bgColor:(NSString *)bgColor bgImageH5:(NSString *)bgImageH5; |
| 15 | 23 | @end |
| 16 | 24 | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveListController.m
| ... | ... | @@ -46,10 +46,12 @@ |
| 46 | 46 | if ([_model.id isEqualToString:@"1"]) { |
| 47 | 47 | time = 60; |
| 48 | 48 | } |
| 49 | + //传入数据创建加载View | |
| 49 | 50 | UIViewController *subVC = [CNLiveClassifyJumpBridge ListViewWithPageType:_model.pageType.integerValue param:_paramDic]; |
| 50 | 51 | [self.view addSubview:subVC.view]; |
| 51 | 52 | [self addChildViewController:subVC]; |
| 52 | 53 | [subVC didMoveToParentViewController:self]; |
| 54 | + //调用当前vc的刷新功能获取数据 | |
| 53 | 55 | [CNLiveClassifyJumpBridge listViewRefreshWithVC:subVC pageType:_model.pageType.integerValue param:_paramDic refreshTime:time]; |
| 54 | 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 | 25 | -(instancetype)initWithModel:(CNCategoryGetChannelModel *)model; |
| 26 | 26 | @property (nonatomic, copy) void (^scrollViewDidScrollBlock)(BOOL isUp); |
| 27 | 27 | |
| 28 | +/** | |
| 29 | + 刷新二级分类 | |
| 30 | + */ | |
| 28 | 31 | - (void)refreshCurrentVCData; |
| 32 | +/** | |
| 33 | + 显示引导说明图 | |
| 34 | + */ | |
| 29 | 35 | - (void)showGuideView; |
| 30 | 36 | // 一级频道显示隐藏时二级频道右侧的搜索按钮变宽变窄控制 |
| 31 | 37 | - (void)rightSubViewWithShow:(BOOL)show; | ... | ... |
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Header/CNLiveCommonDefines.h
| ... | ... | @@ -9,20 +9,20 @@ |
| 9 | 9 | #define CNLiveCommonDefines_h |
| 10 | 10 | |
| 11 | 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 | 26 | } CNLiveClassifyJumpType; |
| 27 | 27 | |
| 28 | 28 | static NSString *const CNLiveLaunchWithFirsh = @"CNLiveLaunchWithFirsh"; | ... | ... |