口袋优选

KBNineNineMainViewController.m 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. //
  2. // KBNineNineMainViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by xiaoxi on 2018/1/16.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "KBNineNineMainViewController.h"
  9. #import "KBTableView.h"
  10. #import "KBNineNineHeaderView.h"
  11. #import "KBNineNineScrollViewController.h"
  12. #import "KBNineNineTableViewCell.h"
  13. #import "KBNineNineRequestViewModel.h"
  14. #import "KBNineTableView.h"
  15. #import "KBGoodListViewController.h"
  16. #import "KBGoodDetailViewController.h"
  17. #import "PYSearch.h"
  18. #import "KBFindSearchResultViewController.h"
  19. #import "KBFindRequestViewModel.h"
  20. #import "KBGoodListCidViewController.h"
  21. #import "KBNineNineScrollChildViewController.h"
  22. static NSString *const cellID = @"KBNineNineTableViewCell";
  23. @interface KBNineNineMainViewController () <UITableViewDelegate,UITableViewDataSource,YHNineNineScrollViewControllerDelegate,YHNineNineHeaderViewDelegate,YHNineNineTableViewCellDelegate,PYSearchViewControllerDelegate>
  24. @property (nonatomic, strong) UITableView *tableView;
  25. @property (nonatomic, strong) KBNineNineHeaderView *headerView;
  26. @property (nonatomic, strong) KBNineNineScrollViewController *scrollViewController;
  27. @property (nonatomic, strong) KBNineNineModel *nineNineModel;
  28. @property (nonatomic, assign) BOOL canScroll;
  29. @property (nonatomic, strong) YYFPSLabel *fpsLabel;
  30. @property (nonatomic, strong) NSMutableArray *everyoneSearchArr;
  31. @end
  32. @implementation KBNineNineMainViewController
  33. - (void)viewWillDisappear:(BOOL)animated {
  34. [super viewWillDisappear:animated];
  35. [SVProgressHUD dismiss];
  36. }
  37. - (void)viewDidLoad {
  38. [super viewDidLoad];
  39. [self initHUD];
  40. [self initNavBar];
  41. [self request];
  42. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changedSexRequest) name:ChangeSex object:nil];
  43. }
  44. - (void)didReceiveMemoryWarning {
  45. [super didReceiveMemoryWarning];
  46. }
  47. - (void)initNavBar {
  48. self.canScroll = YES;
  49. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
  50. [self.navigationBar setNavightionBarBackgroundColor:[UIColor clearColor]];
  51. // NSInteger sex = [[[NSUserDefaults standardUserDefaults] objectForKey:UserSexKey] integerValue];
  52. // if (sex == 0) {
  53. // [self.navigationBar setNavightionBarBackgroundColor:[UIColor YHColorWithHex:0xff8daa]];
  54. // } else {
  55. // [self.navigationBar setNavightionBarBackgroundColor:[UIColor YHColorWithHex:0x98befd]];
  56. // }
  57. UIButton *search = [UIButton buttonWithType:UIButtonTypeCustom];
  58. search.frame = CGRectMake(0, 0, FITSIZE(22), FITSIZE(22));
  59. search.backgroundColor = [UIColor clearColor];
  60. [search setBackgroundImage:[UIImage imageNamed:@"search"] forState:UIControlStateNormal];
  61. [search addTarget:self action:@selector(searchButtonAction) forControlEvents:UIControlEventTouchUpInside];
  62. [self.navigationBar setCustomRightButtons:@[search]];
  63. UIImageView *titleImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.navigationBar.width/2-FITSIZE(116)/2, KStatusBarHeight+22-FITSIZE(25)/2, FITSIZE(116), FITSIZE(25))];
  64. titleImageView.backgroundColor = [UIColor clearColor];
  65. titleImageView.image = [UIImage imageNamed:@"99navBar"];
  66. [self.navigationBar addSubview:titleImageView];
  67. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  68. [leftBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
  69. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  70. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  71. leftBtn.hidden = !self.showBackButton;
  72. }
  73. - (void)backAction {
  74. [self.navigationController popViewControllerAnimated:YES];
  75. }
  76. - (void)searchButtonAction {
  77. [self createSearchViewControllerWith:nil];
  78. }
  79. #pragma mark notify
  80. - (void)changeScrollStatus//改变主视图的状态
  81. {
  82. self.canScroll = YES;
  83. self.scrollViewController.childCanScroll = NO;
  84. }
  85. - (void)initSubviews {
  86. [SVProgressHUD dismiss];
  87. [self.view addSubview:self.tableView];
  88. self.tableView.tableHeaderView = self.headerView;
  89. [self.tableView reloadData];
  90. [self.view bringSubviewToFront:self.navigationBar];
  91. _fpsLabel = [YYFPSLabel new];
  92. [_fpsLabel sizeToFit];
  93. _fpsLabel.bottom = kScreenHeight - TabbarHeight;
  94. _fpsLabel.left = 0;
  95. _fpsLabel.alpha = 0;
  96. // [self.view addSubview:_fpsLabel];
  97. }
  98. #pragma mark - HUD
  99. - (void)initHUD {
  100. [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
  101. [SVProgressHUD setForegroundColor:[UIColor YHColorWithHex:0xff2420]];
  102. [SVProgressHUD setBackgroundColor:[UIColor YHColorWithHex:0xf5f4f4]];
  103. }
  104. #pragma mark - request
  105. - (void)request {
  106. [SVProgressHUD show];
  107. [self requestGoodList];
  108. [self requestEveryoneSearch];
  109. }
  110. - (void)changedSexRequest {
  111. NSInteger sex = [[[NSUserDefaults standardUserDefaults] objectForKey:UserSexKey] integerValue];
  112. if (sex == 0) {
  113. self.headerView.backgroundColor = [UIColor YHColorWithHex:0xff8daa];
  114. [self.navigationBar setNavightionBarBackgroundColor:[UIColor YHColorWithHex:0xff8daa]];
  115. } else {
  116. self.headerView.backgroundColor = [UIColor YHColorWithHex:0x98befd];
  117. [self.navigationBar setNavightionBarBackgroundColor:[UIColor YHColorWithHex:0x98befd]];
  118. }
  119. [self.everyoneSearchArr removeAllObjects];
  120. [self.scrollViewController removeFromParentViewController];
  121. self.scrollViewController = nil;
  122. [self request];
  123. }
  124. - (void)requestGoodList {
  125. [KBNineNineRequestViewModel requestNineNineGoodListParamGid:1 success:^(KBNineNineModel *model) {
  126. if (model) {
  127. self.nineNineModel = model;
  128. self.headerView.headerModel = model.hot;
  129. [self initSubviews];
  130. }
  131. [self.tableView.mj_header endRefreshing];
  132. } failure:^(NSError *error) {
  133. [SVProgressHUD dismiss];
  134. [self.tableView.mj_header endRefreshing];
  135. }];
  136. }
  137. - (void)requestEveryoneSearch {
  138. [KBFindRequestViewModel requestEveryoneSearchSuccess:^(NSArray *array) {
  139. if (array.count > 0) {
  140. for (NSDictionary *dict in array) {
  141. [self.everyoneSearchArr addObject:dict];
  142. }
  143. }
  144. } failure:^(NSError *error) {
  145. }];
  146. }
  147. #pragma mark - nineNineHeaderViewDelegate
  148. - (void)yh_NineNineHeaderViewDidSelectItem:(YHNineNineHeaderCollectionModel *)model {
  149. if (model.cid.length) {
  150. KBGoodListCidViewController *listVC = [[KBGoodListCidViewController alloc] init];
  151. listVC.goods_id = model.Id.stringValue;
  152. listVC.cid = model.cid;
  153. listVC.topRequest = 2;
  154. [self.navigationController pushViewController:listVC animated:YES];
  155. }
  156. else {
  157. KBGoodListViewController *listVC = [[KBGoodListViewController alloc] init];
  158. listVC.cate_id = model.Id.stringValue;
  159. [self.navigationController pushViewController:listVC animated:YES];
  160. }
  161. [MobClick event:nine_top_pic];
  162. }
  163. #pragma mark - nineNineTableViewCellDelegate
  164. - (void)yh_NineNineTableViewCellDidSelectItem:(YHNineNineMiddleModel *)model {
  165. if (model.title.cid.length) {
  166. KBGoodListCidViewController *listVC = [[KBGoodListCidViewController alloc] init];
  167. listVC.goods_id = model.title.Id.stringValue;
  168. listVC.cid = model.title.cid;
  169. listVC.topRequest = 2;
  170. [self.navigationController pushViewController:listVC animated:YES];
  171. }
  172. else {
  173. KBGoodListViewController *listVC = [[KBGoodListViewController alloc] init];
  174. listVC.cate_id = model.title.Id.stringValue;
  175. [self.navigationController pushViewController:listVC animated:YES];
  176. }
  177. [MobClick event:nine_better];
  178. }
  179. #pragma mark - nineNineScrollViewControllerDelegate
  180. - (void)yh_NineNineScrollViewControllerDidSelectItem:(KBChildGoodModel *)model {
  181. if ([model.type isEqualToString:@"0"]) {
  182. //详情
  183. KBGoodDetailViewController *detailVC = [[KBGoodDetailViewController alloc] init];
  184. DetailRequestModel *requestModel = [[DetailRequestModel alloc] initWithChildModel:model];
  185. detailVC.requestModel = requestModel;
  186. [self.navigationController pushViewController:detailVC animated:YES];
  187. }
  188. else {
  189. if (model.cid.length) {
  190. KBGoodListCidViewController *listVC = [[KBGoodListCidViewController alloc] init];
  191. listVC.goods_id = model.goods_id;
  192. listVC.cid = model.cid;
  193. listVC.topRequest = 1;
  194. [self.navigationController pushViewController:listVC animated:YES];
  195. }
  196. else {
  197. //专场
  198. KBGoodListViewController *listVC = [[KBGoodListViewController alloc] init];
  199. listVC.cate_id = model.goods_id;
  200. [self.navigationController pushViewController:listVC animated:YES];
  201. }
  202. }
  203. }
  204. #pragma mark - search
  205. - (void)createSearchViewControllerWith:(NSString *)text {
  206. PYSearchViewController *searchViewController = [PYSearchViewController searchViewControllerWithHotSearches:@[] searchBarPlaceholder:@"输入商品名或粘贴淘宝标题"];
  207. searchViewController.swapHotSeachWithSearchHistory = YES;
  208. searchViewController.searchHistoryStyle = PYSearchHistoryStyleARCBorderTag;
  209. searchViewController.hotSearchStyle = PYHotSearchStyleARCBorderTag;
  210. searchViewController.searchTextField.font = [UIFont systemFontOfSize:13];
  211. searchViewController.delegate = self;
  212. searchViewController.searchBar.text = text;
  213. [self getHotSearchToSearchViewController:searchViewController];
  214. UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:searchViewController];
  215. [self presentViewController:nav animated:NO completion:^{
  216. for (int i = 0; i < searchViewController.hotSearchTags.count; i++) {
  217. UILabel *tag = searchViewController.hotSearchTags[i];
  218. NSDictionary *dic = self.everyoneSearchArr[i];
  219. if ([dic[@"color"] boolValue]) {
  220. tag.layer.borderColor = [UIColor homeRedColor].CGColor;
  221. tag.textColor = [UIColor homeRedColor];
  222. }
  223. }
  224. }];
  225. searchViewController.didSearchBlock = ^(PYSearchViewController *searchViewController, UISearchBar *searchBar, NSString *searchText) {
  226. [MobClick event:search_count label:Search_Normal];
  227. //处理搜索点击事件
  228. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  229. resultVC.searchName = searchText;
  230. [nav pushViewController:resultVC animated:NO];
  231. };
  232. }
  233. /**
  234. 加载热搜词汇
  235. */
  236. - (void)getHotSearchToSearchViewController:(PYSearchViewController *)searchViewController {
  237. NSMutableArray *hotSearch = [NSMutableArray array];
  238. for (NSDictionary *dic in self.everyoneSearchArr) {
  239. [hotSearch addObject:dic[@"name"]];
  240. }
  241. searchViewController.hotSearches = hotSearch;
  242. }
  243. #pragma mark - PYSearchViewControllerDelegate
  244. /**
  245. 输入完成时触发
  246. */
  247. - (void)searchViewController:(PYSearchViewController *)searchViewController searchTextDidChange:(UISearchBar *)seachBar searchText:(NSString *)searchText
  248. {
  249. if (searchText.length) {
  250. [KBHttp get:SearchAdvice params:@{@"name":searchText} success:^(id json) {
  251. NSArray *list = json[@"data"];
  252. searchViewController.searchSuggestions = list;
  253. } failure:^(NSError *error) {
  254. }];
  255. }
  256. }
  257. /**
  258. 点击建议
  259. */
  260. - (void)searchViewController:(PYSearchViewController *)searchViewController
  261. didSelectSearchSuggestionAtIndex:(NSInteger)index
  262. searchText:(NSString *)searchText {
  263. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  264. resultVC.searchName = searchText;
  265. [searchViewController.navigationController pushViewController:resultVC animated:NO];
  266. }
  267. /**
  268. 点击热搜
  269. */
  270. - (void)searchViewController:(PYSearchViewController *)searchViewController
  271. didSelectHotSearchAtIndex:(NSInteger)index
  272. searchText:(NSString *)searchText {
  273. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  274. resultVC.searchName = searchText;
  275. [searchViewController.navigationController pushViewController:resultVC animated:NO];
  276. [MobClick event:search_count label:Search_Hot_String];
  277. }
  278. /**
  279. 点击历史
  280. */
  281. - (void)searchViewController:(PYSearchViewController *)searchViewController
  282. didSelectSearchHistoryAtIndex:(NSInteger)index
  283. searchText:(NSString *)searchText {
  284. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  285. resultVC.searchName = searchText;
  286. [searchViewController.navigationController pushViewController:resultVC animated:NO];
  287. [MobClick event:search_count label:Search_History_String];
  288. }
  289. #pragma mark - tableView
  290. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  291. return 2;
  292. }
  293. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  294. if (section == 0) {
  295. return self.nineNineModel.recommend.count;
  296. }
  297. else {
  298. return 0;
  299. }
  300. }
  301. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  302. KBNineNineTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
  303. cell.delegate = self;
  304. YHNineNineMiddleModel *model = self.nineNineModel.recommend[indexPath.row];
  305. cell.model = model;
  306. return cell;
  307. }
  308. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  309. if (section == 0) {
  310. return [[UIView alloc] init];
  311. }
  312. else {
  313. return self.scrollViewController.view;
  314. }
  315. }
  316. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  317. if (section == 0) {
  318. return 0.1;
  319. }
  320. else {
  321. return kScreenHeight-NavBarHeight;
  322. }
  323. }
  324. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  325. if (indexPath.section == 0) {
  326. return FITSIZE(240);
  327. }
  328. else {
  329. return 0.1;
  330. }
  331. }
  332. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  333. YHNineNineMiddleModel *model = self.nineNineModel.recommend[indexPath.row];
  334. if (model.title.cid.length) {
  335. KBGoodListCidViewController *listVC = [[KBGoodListCidViewController alloc] init];
  336. listVC.goods_id = model.title.Id.stringValue;
  337. listVC.cid = model.title.cid;
  338. listVC.topRequest = 2;
  339. [self.navigationController pushViewController:listVC animated:YES];
  340. }
  341. else {
  342. KBGoodListViewController *listVC = [[KBGoodListViewController alloc] init];
  343. listVC.cate_id = model.title.Id.stringValue;
  344. [self.navigationController pushViewController:listVC animated:YES];
  345. }
  346. }
  347. #pragma mark - scrollView
  348. - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  349. if (scrollView.contentOffset.y >= 0) {
  350. NSInteger sex = [[[NSUserDefaults standardUserDefaults] objectForKey:UserSexKey] integerValue];
  351. if (sex == 0) {
  352. [self.navigationBar setNavightionBarBackgroundColor:[UIColor YHColorWithHex:0xff8daa]];
  353. } else {
  354. [self.navigationBar setNavightionBarBackgroundColor:[UIColor YHColorWithHex:0x98befd]];
  355. }
  356. self.tableView.backgroundView.backgroundColor = [UIColor clearColor];
  357. self.tableView.backgroundColor = [UIColor clearColor];
  358. }
  359. else {
  360. [self.navigationBar setNavightionBarBackgroundColor:[UIColor clearColor]];
  361. NSInteger sex = [[[NSUserDefaults standardUserDefaults] objectForKey:UserSexKey] integerValue];
  362. if (sex == 0) {
  363. self.tableView.backgroundView.backgroundColor = [UIColor YHColorWithHex:0xff8daa];
  364. self.tableView.backgroundColor = [UIColor YHColorWithHex:0xff8daa];
  365. } else {
  366. self.tableView.backgroundView.backgroundColor = [UIColor YHColorWithHex:0x98befd];
  367. self.tableView.backgroundColor = [UIColor YHColorWithHex:0x98befd];
  368. }
  369. }
  370. CGFloat offY = scrollView.contentOffset.y;
  371. CGFloat height = [self.tableView rectForSection:1].origin.y - NavBarHeight;
  372. if (offY >= height) {
  373. [self.tableView setContentOffset:CGPointMake(0, height)];
  374. if (self.canScroll) {
  375. self.canScroll = NO;
  376. self.scrollViewController.childCanScroll = YES;
  377. }
  378. }else {
  379. if (!self.canScroll) {//子视图没到顶部
  380. scrollView.contentOffset = CGPointMake(0, height);
  381. }
  382. }
  383. }
  384. - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
  385. if (_fpsLabel.alpha == 0) {
  386. [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  387. _fpsLabel.alpha = 1;
  388. } completion:NULL];
  389. }
  390. }
  391. - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
  392. if (!decelerate) {
  393. if (_fpsLabel.alpha != 0) {
  394. [UIView animateWithDuration:1 delay:2 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  395. _fpsLabel.alpha = 0;
  396. } completion:NULL];
  397. }
  398. }
  399. }
  400. - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
  401. if (_fpsLabel.alpha != 0) {
  402. [UIView animateWithDuration:1 delay:2 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  403. _fpsLabel.alpha = 0;
  404. } completion:NULL];
  405. }
  406. }
  407. - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView {
  408. if (_fpsLabel.alpha == 0) {
  409. [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  410. _fpsLabel.alpha = 1;
  411. } completion:^(BOOL finished) {
  412. }];
  413. }
  414. }
  415. #pragma mark - lazy
  416. - (UITableView *)tableView {
  417. if (!_tableView) {
  418. // CGFloat height = self.showBackButton?SCREEN_HEIGHT:SCREEN_HEIGHT-TabbarHeight;
  419. _tableView = [[KBNineTableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) style:UITableViewStylePlain];
  420. _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  421. _tableView.backgroundView.backgroundColor = [UIColor clearColor];
  422. _tableView.backgroundColor = [UIColor clearColor];
  423. _tableView.showsVerticalScrollIndicator = NO;
  424. _tableView.estimatedRowHeight = 0;
  425. _tableView.estimatedSectionHeaderHeight = 0;
  426. _tableView.estimatedSectionFooterHeight = 0;
  427. _tableView.delegate = self;
  428. _tableView.dataSource = self;
  429. [_tableView registerClass:[KBNineNineTableViewCell class] forCellReuseIdentifier:cellID];
  430. if (@available(iOS 11.0, *)) {
  431. _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  432. }
  433. kWeak(self);
  434. MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
  435. [selfWeak changedSexRequest];
  436. }];
  437. header.lastUpdatedTimeLabel.textColor = [UIColor whiteColor];
  438. header.stateLabel.textColor = [UIColor whiteColor];
  439. _tableView.mj_header = header;
  440. }
  441. return _tableView;
  442. }
  443. - (KBNineNineHeaderView *)headerView {
  444. if (!_headerView) {
  445. _headerView = [[KBNineNineHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, FITSIZE((197+NavBarHeight)))];
  446. _headerView.delegate = self;
  447. }
  448. return _headerView;
  449. }
  450. - (KBNineNineScrollViewController *)scrollViewController {
  451. if (!_scrollViewController) {
  452. _scrollViewController = [[KBNineNineScrollViewController alloc] init];
  453. _scrollViewController.delegate = self;
  454. [self addChildViewController:_scrollViewController];
  455. }
  456. return _scrollViewController;
  457. }
  458. - (NSMutableArray *)everyoneSearchArr {
  459. if (!_everyoneSearchArr) {
  460. _everyoneSearchArr = [NSMutableArray array];
  461. }
  462. return _everyoneSearchArr;
  463. }
  464. @end