Commit 50601e76b72ede7944f9131857a8cf27922b42c7
1 parent
39206ec1
0.6.0添加搜索标签入口
Showing
7 changed files
with
23 additions
and
5 deletions
CNLiveVideoClassifyKit.podspec
CNLiveVideoClassifyKit/Classes/Manager/CNLiveListManager.h
| ... | ... | @@ -21,6 +21,10 @@ NS_ASSUME_NONNULL_BEGIN |
| 21 | 21 | + (CNCategoryBaseViewController *)CNCategoryBaseViewController; |
| 22 | 22 | /// 跳转目击者搜索页 |
| 23 | 23 | + (void)pushWitnessSearchVC; |
| 24 | + | |
| 25 | +/// 跳转目击者搜索页 | |
| 26 | +/// @param searchStr 搜索字串 | |
| 27 | ++ (void)pushWitnessSearchVCWithSearchStr:(NSString *)searchStr; | |
| 24 | 28 | /// 用户信息变动,修改关注状态 |
| 25 | 29 | /// @param jsonStr 返回参数 |
| 26 | 30 | + (void)personMessageChange:(NSString *)jsonStr; | ... | ... |
CNLiveVideoClassifyKit/Classes/Manager/CNLiveListManager.m
| ... | ... | @@ -32,7 +32,11 @@ |
| 32 | 32 | return [[CNLiveClassifySegmentController alloc] init]; |
| 33 | 33 | } |
| 34 | 34 | + (void)pushWitnessSearchVC{ |
| 35 | + [CNLiveListManager pushWitnessSearchVCWithSearchStr:@""]; | |
| 36 | +} | |
| 37 | ++ (void)pushWitnessSearchVCWithSearchStr:(NSString *)searchStr{ | |
| 35 | 38 | CNWitnessSearchViewController *vc = [CNWitnessSearchViewController new]; |
| 39 | + vc.searchStr = searchStr; | |
| 36 | 40 | [[BaseAppDelegate sharedAppDelegate] pushViewController:vc]; |
| 37 | 41 | } |
| 38 | 42 | - (void)firstHeaderUp:(BOOL)isUp | ... | ... |
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchViewController.h
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchViewController.m
| ... | ... | @@ -76,6 +76,12 @@ static NSString *const CNWitnessSearchHeaderViewID = @"CNWitnessSearchHeaderView |
| 76 | 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 | 86 | - (void)viewWillDisappear:(BOOL)animated{ |
| 81 | 87 | [super viewWillDisappear:animated]; | ... | ... |
Example/CNLiveVideoClassifyKit/CNLIVEAppDelegate.m
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | |
| 18 | 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 | 22 | [BHContext shareInstance].application = application; |
| 23 | 23 | [BHContext shareInstance].launchOptions = launchOptions; | ... | ... |
Example/CNLiveVideoClassifyKit/CNLIVEViewController.m
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | [BHConfig set:ChannelsSelectFirst value:@"0"]; |
| 46 | 46 | [CNTools GetClassifyChannelsUrlsAndSave]; |
| 47 | 47 | self.title = @"首页"; |
| 48 | - segArr = @[@"分类",@"搜索"]; | |
| 48 | + segArr = @[@"分类",@"搜索",@"搜索文字"]; | |
| 49 | 49 | [self.view addSubview:self.collectionView]; |
| 50 | 50 | } |
| 51 | 51 | -(void)viewDidAppear:(BOOL)animated |
| ... | ... | @@ -80,7 +80,11 @@ |
| 80 | 80 | [CNLiveListManager pushWitnessSearchVC]; |
| 81 | 81 | } |
| 82 | 82 | break; |
| 83 | - | |
| 83 | + case 2: | |
| 84 | + { | |
| 85 | + [CNLiveListManager pushWitnessSearchVCWithSearchStr:@"目击者"]; | |
| 86 | + } | |
| 87 | + break; | |
| 84 | 88 | default: |
| 85 | 89 | break; |
| 86 | 90 | } | ... | ... |