Commit 50601e76b72ede7944f9131857a8cf27922b42c7
1 parent
39206ec1
0.6.0添加搜索标签入口
Showing
7 changed files
with
23 additions
and
5 deletions
CNLiveVideoClassifyKit.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveVideoClassifyKit' | 10 | s.name = 'CNLiveVideoClassifyKit' |
| 11 | - s.version = '0.5.9' | 11 | + s.version = '0.6.0' |
| 12 | s.summary = '视讯头部一二级菜单组件' | 12 | s.summary = '视讯头部一二级菜单组件' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveVideoClassifyKit/Classes/Manager/CNLiveListManager.h
| @@ -21,6 +21,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -21,6 +21,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 21 | + (CNCategoryBaseViewController *)CNCategoryBaseViewController; | 21 | + (CNCategoryBaseViewController *)CNCategoryBaseViewController; |
| 22 | /// 跳转目击者搜索页 | 22 | /// 跳转目击者搜索页 |
| 23 | + (void)pushWitnessSearchVC; | 23 | + (void)pushWitnessSearchVC; |
| 24 | + | ||
| 25 | +/// 跳转目击者搜索页 | ||
| 26 | +/// @param searchStr 搜索字串 | ||
| 27 | ++ (void)pushWitnessSearchVCWithSearchStr:(NSString *)searchStr; | ||
| 24 | /// 用户信息变动,修改关注状态 | 28 | /// 用户信息变动,修改关注状态 |
| 25 | /// @param jsonStr 返回参数 | 29 | /// @param jsonStr 返回参数 |
| 26 | + (void)personMessageChange:(NSString *)jsonStr; | 30 | + (void)personMessageChange:(NSString *)jsonStr; |
CNLiveVideoClassifyKit/Classes/Manager/CNLiveListManager.m
| @@ -32,7 +32,11 @@ | @@ -32,7 +32,11 @@ | ||
| 32 | return [[CNLiveClassifySegmentController alloc] init]; | 32 | return [[CNLiveClassifySegmentController alloc] init]; |
| 33 | } | 33 | } |
| 34 | + (void)pushWitnessSearchVC{ | 34 | + (void)pushWitnessSearchVC{ |
| 35 | + [CNLiveListManager pushWitnessSearchVCWithSearchStr:@""]; | ||
| 36 | +} | ||
| 37 | ++ (void)pushWitnessSearchVCWithSearchStr:(NSString *)searchStr{ | ||
| 35 | CNWitnessSearchViewController *vc = [CNWitnessSearchViewController new]; | 38 | CNWitnessSearchViewController *vc = [CNWitnessSearchViewController new]; |
| 39 | + vc.searchStr = searchStr; | ||
| 36 | [[BaseAppDelegate sharedAppDelegate] pushViewController:vc]; | 40 | [[BaseAppDelegate sharedAppDelegate] pushViewController:vc]; |
| 37 | } | 41 | } |
| 38 | - (void)firstHeaderUp:(BOOL)isUp | 42 | - (void)firstHeaderUp:(BOOL)isUp |
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchViewController.h
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | NS_ASSUME_NONNULL_BEGIN | 10 | NS_ASSUME_NONNULL_BEGIN |
| 11 | 11 | ||
| 12 | @interface CNWitnessSearchViewController : CNCommonViewController | 12 | @interface CNWitnessSearchViewController : CNCommonViewController |
| 13 | - | 13 | +@property (nonatomic, copy)NSString *searchStr; |
| 14 | @end | 14 | @end |
| 15 | 15 | ||
| 16 | NS_ASSUME_NONNULL_END | 16 | NS_ASSUME_NONNULL_END |
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchViewController.m
| @@ -76,6 +76,12 @@ static NSString *const CNWitnessSearchHeaderViewID = @"CNWitnessSearchHeaderView | @@ -76,6 +76,12 @@ static NSString *const CNWitnessSearchHeaderViewID = @"CNWitnessSearchHeaderView | ||
| 76 | make.width.mas_equalTo(kScreenWidth); | 76 | make.width.mas_equalTo(kScreenWidth); |
| 77 | }]; | 77 | }]; |
| 78 | } | 78 | } |
| 79 | +- (void)viewDidAppear:(BOOL)animated{ | ||
| 80 | + [super viewDidAppear:animated]; | ||
| 81 | + if (![self.searchStr isEqualToString:@""]){ | ||
| 82 | + [self historyArrayValueChange:self.searchStr]; | ||
| 83 | + } | ||
| 84 | +} | ||
| 79 | 85 | ||
| 80 | - (void)viewWillDisappear:(BOOL)animated{ | 86 | - (void)viewWillDisappear:(BOOL)animated{ |
| 81 | [super viewWillDisappear:animated]; | 87 | [super viewWillDisappear:animated]; |
Example/CNLiveVideoClassifyKit/CNLIVEAppDelegate.m
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | 17 | ||
| 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
| 19 | { | 19 | { |
| 20 | - [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];//CNLiveDebugAppStore];//CNLiveProductionAppStore//CNLiveTestFlight | 20 | + [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];//CNLiveDebugAppStore];//CNLiveProductionAppStore//CNLiveTestFlight |
| 21 | 21 | ||
| 22 | [BHContext shareInstance].application = application; | 22 | [BHContext shareInstance].application = application; |
| 23 | [BHContext shareInstance].launchOptions = launchOptions; | 23 | [BHContext shareInstance].launchOptions = launchOptions; |
Example/CNLiveVideoClassifyKit/CNLIVEViewController.m
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | [BHConfig set:ChannelsSelectFirst value:@"0"]; | 45 | [BHConfig set:ChannelsSelectFirst value:@"0"]; |
| 46 | [CNTools GetClassifyChannelsUrlsAndSave]; | 46 | [CNTools GetClassifyChannelsUrlsAndSave]; |
| 47 | self.title = @"首页"; | 47 | self.title = @"首页"; |
| 48 | - segArr = @[@"分类",@"搜索"]; | 48 | + segArr = @[@"分类",@"搜索",@"搜索文字"]; |
| 49 | [self.view addSubview:self.collectionView]; | 49 | [self.view addSubview:self.collectionView]; |
| 50 | } | 50 | } |
| 51 | -(void)viewDidAppear:(BOOL)animated | 51 | -(void)viewDidAppear:(BOOL)animated |
| @@ -80,7 +80,11 @@ | @@ -80,7 +80,11 @@ | ||
| 80 | [CNLiveListManager pushWitnessSearchVC]; | 80 | [CNLiveListManager pushWitnessSearchVC]; |
| 81 | } | 81 | } |
| 82 | break; | 82 | break; |
| 83 | - | 83 | + case 2: |
| 84 | + { | ||
| 85 | + [CNLiveListManager pushWitnessSearchVCWithSearchStr:@"目击者"]; | ||
| 86 | + } | ||
| 87 | + break; | ||
| 84 | default: | 88 | default: |
| 85 | break; | 89 | break; |
| 86 | } | 90 | } |