口袋优选

KBFindMainViewController.m 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. //
  2. // KBFindMainViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by xiaoxi on 2018/1/16.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "KBFindMainViewController.h"
  9. #import "KBFindNavBarView.h"
  10. #import "KBCollectionView.h"
  11. #import "KBFindTopView.h"
  12. #import "KBFindMiddleView.h"
  13. #import "KBGoodCollectionCell.h"
  14. #import "KBFindRequestViewModel.h"
  15. #import "KBGoodDetailViewController.h"
  16. #import "KBFindNavBarStaticView.h"
  17. #import "KBGoodListViewController.h"
  18. #import "KBFindChannelViewController.h"
  19. #import "PYSearch.h"
  20. #import "KBFindSearchResultViewController.h"
  21. #import "KBFindBookWebViewController.h"
  22. #define TopViewHeight ((self.hotSearchArr.count-1)/3+1)*FITSIZE(75)+(((self.hotSearchArr.count-1)/3)*FITSIZE(10))+FITSIZE(60)
  23. #define MiddleViewHeight ((self.channelArr.count-1)/4+1)*FITSIZE(66)+(((self.channelArr.count-1)/4)*FITSIZE(26))+FITSIZE(70)
  24. static NSString *const cellID = @"KBGoodCollectionCell";
  25. static NSString *const collectionViewNavBar = @"navBar";
  26. static NSString *const collectionViewTop = @"top";
  27. static NSString *const collectionViewMiddle = @"middle";
  28. static NSString *const collectionViewBottom = @"bottom";
  29. static NSInteger page = 1;
  30. @interface KBFindMainViewController () <YHFindNavBarViewDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,YHFindTopViewDelegate,YHFindMiddleViewDelegate,YHFindNavBarStaticViewDelegate,PYSearchViewControllerDelegate>
  31. @property (nonatomic, strong) UICollectionView *collectionView;
  32. @property (nonatomic, strong) NSMutableArray *guessYouLikeArr;
  33. @property (nonatomic, strong) NSMutableArray *hotSearchArr;
  34. @property (nonatomic, strong) NSMutableArray *channelArr;
  35. @property (nonatomic, strong) KBFindNavBarStaticView *navBarStaticView;
  36. @property (nonatomic, strong) KBFindNavBarView *navBarView;
  37. @property (nonatomic, strong) YYFPSLabel *fpsLabel;
  38. @property (nonatomic, strong) NSMutableArray *everyoneSearchArr;
  39. @property (nonatomic, strong) NSNumber *couponTotalNum;
  40. @end
  41. @implementation KBFindMainViewController
  42. - (void)viewWillDisappear:(BOOL)animated {
  43. [super viewWillDisappear:animated];
  44. [SVProgressHUD dismiss];
  45. }
  46. - (void)viewDidLoad {
  47. [super viewDidLoad];
  48. [self initHUD];
  49. [self initNavBar];
  50. [self request];
  51. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changedSexRequest) name:ChangeSex object:nil];
  52. }
  53. - (void)didReceiveMemoryWarning {
  54. [super didReceiveMemoryWarning];
  55. }
  56. - (void)initNavBar {
  57. self.navigationBar.hidden = YES;
  58. [self.view addSubview:self.navBarStaticView];
  59. }
  60. - (void)initSubviews {
  61. [self.view addSubview:self.collectionView];
  62. [self.collectionView reloadData];
  63. [self.view bringSubviewToFront:self.navBarStaticView];
  64. _fpsLabel = [YYFPSLabel new];
  65. [_fpsLabel sizeToFit];
  66. _fpsLabel.left = 0;
  67. _fpsLabel.bottom = kScreenHeight - TabbarHeight;
  68. _fpsLabel.alpha = 0;
  69. // [self.view addSubview:_fpsLabel];
  70. }
  71. #pragma mark - HUD
  72. - (void)initHUD {
  73. [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
  74. [SVProgressHUD setForegroundColor:[UIColor YHColorWithHex:0xff2420]];
  75. [SVProgressHUD setBackgroundColor:[UIColor YHColorWithHex:0xf5f4f4]];
  76. }
  77. #pragma mark - request
  78. - (void)request {
  79. [SVProgressHUD show];
  80. // [self requestHotSearch];
  81. [self requestChannel];
  82. [self requestEveryoneSearch];
  83. [self requestCouponTotal];
  84. }
  85. - (void)changedSexRequest {
  86. [self.hotSearchArr removeAllObjects];
  87. [self.channelArr removeAllObjects];
  88. [self.everyoneSearchArr removeAllObjects];
  89. page = 1;
  90. [self request];
  91. }
  92. - (void)requestHotSearch {
  93. [KBFindRequestViewModel requestHotSearchSuccess:^(NSArray *array) {
  94. [self.hotSearchArr addObjectsFromArray:array];
  95. [self requestChannel];
  96. } failure:^(NSError *error) {
  97. [SVProgressHUD dismiss];
  98. [self.collectionView.mj_header endRefreshing];
  99. }];
  100. }
  101. - (void)requestChannel {
  102. [KBFindRequestViewModel requestChannelSuccess:^(NSArray *array) {
  103. [self.channelArr addObjectsFromArray:array];
  104. [self requestGuessYouLike];
  105. } failure:^(NSError *error) {
  106. [SVProgressHUD dismiss];
  107. [self.collectionView.mj_header endRefreshing];
  108. }];
  109. }
  110. - (void)requestGuessYouLike {
  111. [KBFindRequestViewModel requestGuessYouLikeParamPage:page success:^(NSArray *array) {
  112. if ([self.collectionView.mj_header isRefreshing]) {
  113. [self.guessYouLikeArr removeAllObjects];
  114. }
  115. [SVProgressHUD dismiss];
  116. [self.guessYouLikeArr addObjectsFromArray:array];
  117. if (page == 1) {
  118. [self initSubviews];
  119. }
  120. else {
  121. [self.collectionView reloadData];
  122. }
  123. [self.collectionView.mj_header endRefreshing];
  124. [self.collectionView.mj_footer endRefreshing];
  125. } failure:^(NSError *error) {
  126. [SVProgressHUD dismiss];
  127. [self.collectionView.mj_header endRefreshing];
  128. [self.collectionView.mj_footer endRefreshing];
  129. }];
  130. }
  131. - (void)requestEveryoneSearch {
  132. [KBFindRequestViewModel requestEveryoneSearchSuccess:^(NSArray *array) {
  133. if (array.count > 0) {
  134. for (NSDictionary *dict in array) {
  135. [self.everyoneSearchArr addObject:dict];
  136. }
  137. }
  138. } failure:^(NSError *error) {
  139. }];
  140. }
  141. - (void)requestCouponTotal {
  142. [KBFindRequestViewModel requestCouponTotalSuccess:^(NSNumber *num) {
  143. self.couponTotalNum = num;
  144. } failure:^(NSError *error) {
  145. }];
  146. }
  147. #pragma mark - navBarView
  148. - (void)yh_FinNavBarViewClickHelp {
  149. KBFindBookWebViewController *bookVC = [[KBFindBookWebViewController alloc] init];
  150. [self.navigationController pushViewController:bookVC animated:YES];
  151. }
  152. - (void)yh_FindNavBarViewClickSearch {
  153. [self createSearchViewControllerWith:nil];
  154. }
  155. #pragma mark - navBarStaticView
  156. - (void)yh_FindNavBarStaticViewClickSearch {
  157. [self createSearchViewControllerWith:nil];
  158. }
  159. #pragma mark - topView
  160. - (void)yh_FindTopViewDidSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  161. KBFindHotSearchModel *model = self.hotSearchArr[indexPath.item];
  162. [self createSearchViewControllerWith:model.name];
  163. }
  164. #pragma mark - middleView
  165. - (void)yh_FindMiddleViewDidSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  166. KBFindChannelModel *model = self.channelArr[indexPath.item];
  167. KBFindChannelViewController *child = [[KBFindChannelViewController alloc] init];
  168. child.model = model;
  169. [self.navigationController pushViewController:child animated:YES];
  170. [MobClick event:Find_channel label:model.name];
  171. }
  172. #pragma mark - search
  173. - (void)createSearchViewControllerWith:(NSString *)text {
  174. PYSearchViewController *searchViewController = [PYSearchViewController searchViewControllerWithHotSearches:@[] searchBarPlaceholder:@"输入商品名或粘贴淘宝标题"];
  175. searchViewController.searchHistoryStyle = PYSearchHistoryStyleARCBorderTag;
  176. searchViewController.hotSearchStyle = PYHotSearchStyleARCBorderTag;
  177. searchViewController.searchTextField.font = [UIFont systemFontOfSize:13];
  178. searchViewController.delegate = self;
  179. searchViewController.searchBar.text = text;
  180. [self getHotSearchToSearchViewController:searchViewController];
  181. UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:searchViewController];
  182. [self presentViewController:nav animated:NO completion:^{
  183. for (int i = 0; i < searchViewController.hotSearchTags.count; i++) {
  184. UILabel *tag = searchViewController.hotSearchTags[i];
  185. NSDictionary *dic = self.everyoneSearchArr[i];
  186. if ([dic[@"color"] boolValue]) {
  187. tag.layer.borderColor = [UIColor homeRedColor].CGColor;
  188. tag.textColor = [UIColor homeRedColor];
  189. }
  190. }
  191. }];
  192. searchViewController.didSearchBlock = ^(PYSearchViewController *searchViewController, UISearchBar *searchBar, NSString *searchText) {
  193. [MobClick event:search_count label:Search_Normal];
  194. //处理搜索点击事件
  195. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  196. resultVC.searchBar = searchBar;
  197. resultVC.searchName = searchText;
  198. [nav pushViewController:resultVC animated:NO];
  199. };
  200. }
  201. /**
  202. 加载热搜词汇
  203. */
  204. - (void)getHotSearchToSearchViewController:(PYSearchViewController *)searchViewController {
  205. NSMutableArray *hotSearch = [NSMutableArray array];
  206. for (NSDictionary *dic in self.everyoneSearchArr) {
  207. [hotSearch addObject:dic[@"name"]];
  208. }
  209. searchViewController.hotSearches = hotSearch;
  210. }
  211. #pragma mark - PYSearchViewControllerDelegate
  212. /**
  213. 输入完成时触发
  214. */
  215. - (void)searchViewController:(PYSearchViewController *)searchViewController searchTextDidChange:(UISearchBar *)seachBar searchText:(NSString *)searchText
  216. {
  217. if (searchText.length) {
  218. [KBHttp get:SearchAdvice params:@{@"name":searchText} success:^(id json) {
  219. NSArray *list = json[@"data"];
  220. searchViewController.searchSuggestions = list;
  221. } failure:^(NSError *error) {
  222. }];
  223. }
  224. }
  225. /**
  226. 点击建议
  227. */
  228. - (void)searchViewController:(PYSearchViewController *)searchViewController
  229. didSelectSearchSuggestionAtIndex:(NSInteger)index
  230. searchText:(NSString *)searchText {
  231. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  232. resultVC.searchName = searchText;
  233. resultVC.searchBar = searchViewController.searchBar;
  234. [searchViewController.navigationController pushViewController:resultVC animated:NO];
  235. }
  236. /**
  237. 点击热搜
  238. */
  239. - (void)searchViewController:(PYSearchViewController *)searchViewController
  240. didSelectHotSearchAtIndex:(NSInteger)index
  241. searchText:(NSString *)searchText {
  242. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  243. resultVC.searchName = searchText;
  244. resultVC.searchBar = searchViewController.searchBar;
  245. [searchViewController.navigationController pushViewController:resultVC animated:NO];
  246. [MobClick event:search_count label:Search_Hot_String];
  247. }
  248. /**
  249. 点击历史
  250. */
  251. - (void)searchViewController:(PYSearchViewController *)searchViewController
  252. didSelectSearchHistoryAtIndex:(NSInteger)index
  253. searchText:(NSString *)searchText {
  254. KBFindSearchResultViewController *resultVC = [[KBFindSearchResultViewController alloc] init];
  255. resultVC.searchName = searchText;
  256. resultVC.searchBar = searchViewController.searchBar;
  257. [searchViewController.navigationController pushViewController:resultVC animated:NO];
  258. [MobClick event:search_count label:Search_History_String];
  259. }
  260. #pragma mark - scrollView
  261. - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  262. CGFloat offsetY = scrollView.contentOffset.y;
  263. CGFloat standard = FITSIZE(80);
  264. // if (offsetY >= standard) {
  265. // self.navBarView.hidden = YES;
  266. // self.navBarStaticView.hidden = NO;
  267. // }
  268. // else {
  269. // self.navBarView.hidden = NO;
  270. // self.navBarStaticView.hidden = YES;
  271. // }
  272. if (offsetY >= 0) {
  273. self.collectionView.backgroundView.backgroundColor = [UIColor clearColor];
  274. self.collectionView.backgroundColor = [UIColor clearColor];
  275. }
  276. else {
  277. self.collectionView.backgroundView.backgroundColor = [UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xff7328] toColor:[UIColor YHColorWithHex:0xff1f1f] withWidth:kScreenWidth];
  278. self.collectionView.backgroundColor = [UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xff7328] toColor:[UIColor YHColorWithHex:0xff1f1f] withWidth:kScreenWidth];
  279. }
  280. }
  281. - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
  282. if (_fpsLabel.alpha == 0) {
  283. [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  284. _fpsLabel.alpha = 1;
  285. } completion:NULL];
  286. }
  287. }
  288. - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
  289. if (!decelerate) {
  290. if (_fpsLabel.alpha != 0) {
  291. [UIView animateWithDuration:1 delay:2 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  292. _fpsLabel.alpha = 0;
  293. } completion:NULL];
  294. }
  295. }
  296. }
  297. - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
  298. if (_fpsLabel.alpha != 0) {
  299. [UIView animateWithDuration:1 delay:2 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  300. _fpsLabel.alpha = 0;
  301. } completion:NULL];
  302. }
  303. }
  304. - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView {
  305. if (_fpsLabel.alpha == 0) {
  306. [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
  307. _fpsLabel.alpha = 1;
  308. } completion:^(BOOL finished) {
  309. }];
  310. }
  311. }
  312. #pragma mark - collectionView
  313. - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
  314. return 3;
  315. }
  316. - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
  317. if (section == 2) {
  318. return self.guessYouLikeArr.count;
  319. }
  320. else {
  321. return 0;
  322. }
  323. }
  324. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  325. KBGoodCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellID forIndexPath:indexPath];
  326. cell.backgroundColor = [UIColor whiteColor];
  327. cell.backgroundView.backgroundColor = [UIColor whiteColor];
  328. cell.contentView.backgroundColor = [UIColor whiteColor];
  329. if (self.guessYouLikeArr.count >= indexPath.item) {
  330. KBChildGoodModel *model = self.guessYouLikeArr[indexPath.item];
  331. cell.model = model;
  332. }
  333. return cell;
  334. }
  335. - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
  336. UICollectionReusableView *view = nil;
  337. if (indexPath.section == 0) {
  338. KBFindMiddleView *middleView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:collectionViewMiddle forIndexPath:indexPath];
  339. middleView.dataSource = self.channelArr;
  340. middleView.delegate = self;
  341. view = middleView;
  342. return view;
  343. }
  344. else if (indexPath.section == 1) {
  345. UICollectionReusableView *bottomView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:collectionViewBottom forIndexPath:indexPath];
  346. bottomView.backgroundColor = [UIColor YHColorWithHex:0xf5f4f4];
  347. UIView *likeView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, FITSIZE(50))];
  348. likeView.backgroundColor = [UIColor clearColor];
  349. [bottomView addSubview:likeView];
  350. UIImageView *likeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, FITSIZE(95), FITSIZE(13))];
  351. likeImageView.center = likeView.center;
  352. likeImageView.backgroundColor = [UIColor clearColor];
  353. likeImageView.image = [UIImage imageNamed:@"guessLike"];
  354. [likeView addSubview:likeImageView];
  355. view = bottomView;
  356. return view;
  357. }
  358. else {
  359. return view;
  360. }
  361. }
  362. - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
  363. // if (section == 0) {
  364. // return CGSizeMake(kScreenWidth, FITSIZE(160));
  365. // }
  366. // else if (section == 1) {
  367. // return CGSizeMake(kScreenWidth, TopViewHeight);
  368. // }
  369. if (section == 0) {
  370. return CGSizeMake(kScreenWidth, MiddleViewHeight);
  371. }
  372. else if (section == 1) {
  373. return CGSizeMake(kScreenWidth, FITSIZE(50));
  374. }
  375. else {
  376. return CGSizeZero;
  377. }
  378. }
  379. - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  380. KBChildGoodModel *model = self.guessYouLikeArr[indexPath.item];
  381. if ([model.type isEqualToString:@"0"]) {
  382. //详情
  383. KBGoodDetailViewController *detailVC = [[KBGoodDetailViewController alloc] init];
  384. DetailRequestModel *requestModel = [[DetailRequestModel alloc] initWithChildModel:model];
  385. detailVC.requestModel = requestModel;
  386. [self.navigationController pushViewController:detailVC animated:YES];
  387. }
  388. else {
  389. //专场
  390. KBGoodListViewController *listVC = [[KBGoodListViewController alloc] init];
  391. listVC.cate_id = model.goods_id;
  392. [self.navigationController pushViewController:listVC animated:YES];
  393. }
  394. [MobClick event:Find_youLike];
  395. }
  396. #pragma mark - lazy
  397. - (UICollectionView *)collectionView {
  398. if (!_collectionView) {
  399. UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
  400. flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
  401. flowLayout.itemSize = CGSizeMake(FITSIZE(184.9), FITSIZE(287));
  402. flowLayout.minimumLineSpacing = FITSIZE(5);
  403. flowLayout.minimumInteritemSpacing = FITSIZE(5);
  404. _collectionView = [[KBCollectionView alloc] initWithFrame:CGRectMake(0, FITSIZE(80), kScreenWidth, kScreenHeight-TabbarHeight-FITSIZE(80)) collectionViewLayout:flowLayout];
  405. _collectionView.delegate = self;
  406. _collectionView.dataSource = self;
  407. [_collectionView registerClass:[KBGoodCollectionCell class] forCellWithReuseIdentifier:cellID];
  408. [_collectionView registerClass:[KBFindNavBarView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:collectionViewNavBar];
  409. [_collectionView registerClass:[KBFindTopView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:collectionViewTop];
  410. [_collectionView registerClass:[KBFindMiddleView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:collectionViewMiddle];
  411. [_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:collectionViewBottom];
  412. if (@available(iOS 11.0, *)) {
  413. _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  414. }
  415. kWeak(self);
  416. MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
  417. [selfWeak changedSexRequest];
  418. }];
  419. header.lastUpdatedTimeLabel.textColor = [UIColor whiteColor];
  420. header.stateLabel.textColor = [UIColor whiteColor];
  421. _collectionView.mj_header = header;
  422. _collectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
  423. page ++;
  424. [selfWeak requestGuessYouLike];
  425. }];
  426. }
  427. return _collectionView;
  428. }
  429. - (NSMutableArray *)guessYouLikeArr {
  430. if (!_guessYouLikeArr) {
  431. _guessYouLikeArr = [NSMutableArray array];
  432. }
  433. return _guessYouLikeArr;
  434. }
  435. - (NSMutableArray *)hotSearchArr {
  436. if (!_hotSearchArr) {
  437. _hotSearchArr = [NSMutableArray array];
  438. }
  439. return _hotSearchArr;
  440. }
  441. - (NSMutableArray *)channelArr {
  442. if (!_channelArr) {
  443. _channelArr = [NSMutableArray array];
  444. }
  445. return _channelArr;
  446. }
  447. - (KBFindNavBarStaticView *)navBarStaticView {
  448. if (!_navBarStaticView) {
  449. _navBarStaticView = [[KBFindNavBarStaticView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, FITSIZE(80))];
  450. _navBarStaticView.delegate = self;
  451. // _navBarStaticView.hidden = YES;
  452. }
  453. return _navBarStaticView;
  454. }
  455. - (NSMutableArray *)everyoneSearchArr {
  456. if (!_everyoneSearchArr) {
  457. _everyoneSearchArr = [NSMutableArray array];
  458. }
  459. return _everyoneSearchArr;
  460. }
  461. @end