ShopMallVC.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. //
  2. // ShopMallVC.m
  3. // YBLive
  4. //
  5. // Created by ybRRR on 2020/8/18.
  6. // Copyright © 2020 cat. All rights reserved.
  7. //
  8. #import "ShopMallVC.h"
  9. #import "HXSearchBar.h"
  10. #import "ShopMallCell.h"
  11. #import "SDCycleScrollView.h"
  12. #import "ShopMallClassView.h"
  13. #import "ShopMallDetailVC.h"
  14. #import "ShopMallSearchVC.h"
  15. #import "OutsideGoodsDetailVC.h"
  16. #import "CommodityDetailVC.h"
  17. //#import "ZYTabBar.h"
  18. #import "YBShopLayout.h"
  19. //#import "MyCollectionVC.h"
  20. #import "ShopHomeVC.h"
  21. @interface ShopMallVC ()<UISearchBarDelegate,UICollectionViewDelegate,UICollectionViewDataSource,SDCycleScrollViewDelegate,mallClassDelegate,YBShopLayoutDeleaget>
  22. {
  23. HXSearchBar *searchBars;
  24. UIView *collectionHeaderView;
  25. UIView *noDataView;
  26. int page;
  27. CGFloat lastContentOffset;
  28. UIView *youngView;
  29. }
  30. @property(nonatomic,strong)UICollectionView *collectionView;
  31. @property(nonatomic,strong)NSMutableArray *infoArray;
  32. @property(nonatomic,strong)NSArray *CarouselArray;//轮播图
  33. @property(nonatomic,strong)NSArray *classArray;//轮播图
  34. @property(nonatomic,strong)NSString *shop_switch;//是否开通店铺
  35. @property (nonatomic,strong) SDCycleScrollView *cycleScroll;
  36. @property (nonatomic,strong)ShopMallClassView *mallClassView;
  37. @property (nonatomic,strong)YBShopLayout *flow;
  38. @end
  39. @implementation ShopMallVC
  40. #pragma mark--------网络请求-------------
  41. -(void)pullInternet{
  42. [YBNetworking postWithUrl:@"Home.getShopList" Dic:@{@"p":@(page)} Suc:^(int code, id info, NSString *msg) {
  43. [_collectionView.mj_header endRefreshing];
  44. [_collectionView.mj_footer endRefreshing];
  45. if (code == 0) {
  46. NSArray *infoA = [info objectAtIndex:0];
  47. NSArray *list = [infoA valueForKey:@"list"];
  48. if (page == 1) {
  49. [_infoArray removeAllObjects];
  50. NSMutableArray *sliderMuArr = [NSMutableArray array];
  51. self.CarouselArray = [infoA valueForKey:@"slide"];
  52. self.classArray = [infoA valueForKey:@"shoptwoclass"];
  53. self.shop_switch = [infoA valueForKey:@"shop_switch"];
  54. [self createCollectionHeaderView];
  55. for (NSDictionary *dic in _CarouselArray) {
  56. [sliderMuArr addObject:minstr([dic valueForKey:@"slide_pic"])];
  57. }
  58. _cycleScroll.imageURLStringsGroup = sliderMuArr;
  59. }
  60. [_infoArray addObjectsFromArray:list];
  61. [_collectionView reloadData];
  62. if (_infoArray.count < 1) {
  63. // [PublicView showTextNoData:_collectionView text1:@"暂无商品" text2:@""];
  64. noDataView.hidden = NO;
  65. noDataView.frame = CGRectMake(0, collectionHeaderView.height+20, _window_width, 40);
  66. }else{
  67. // [PublicView hiddenTextNoData:_collectionView];
  68. noDataView.hidden = YES;
  69. }
  70. if (list.count == 0) {
  71. [_collectionView.mj_footer endRefreshingWithNoMoreData];
  72. }
  73. }
  74. } Fail:^(id fail) {
  75. [_collectionView.mj_header endRefreshing];
  76. [_collectionView.mj_footer endRefreshing];
  77. }];
  78. }
  79. #pragma mark--------青少年模式提示------
  80. -(void)closeYoungClick{
  81. [[YBYoungManager shareInstance]checkYoungStatus:YoungFrom_Center];
  82. }
  83. -(void)showYoungTips{
  84. youngView = [[UIView alloc]init];
  85. youngView.frame = CGRectMake(0, 0, _window_height, _window_height);
  86. youngView.backgroundColor = Normal_Color;
  87. [self.view addSubview:youngView];
  88. UILabel *titleLb = [[UILabel alloc]init];
  89. titleLb.font = [UIFont systemFontOfSize:14];
  90. titleLb.textColor = UIColor.whiteColor;
  91. titleLb.text = YZMsg(@"青少年模式下暂无商品信息");
  92. [youngView addSubview:titleLb];
  93. [titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
  94. make.center.equalTo(self.view);
  95. }];
  96. UIButton *closeBtn = [UIButton buttonWithType:0];
  97. [closeBtn setTitle:YZMsg(@"关闭青少年模式") forState:0];
  98. [closeBtn setTitleColor:Pink_Cor forState:0];
  99. closeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  100. [closeBtn addTarget:self action:@selector(closeYoungClick) forControlEvents:UIControlEventTouchUpInside];
  101. [youngView addSubview:closeBtn];
  102. [closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  103. make.centerX.equalTo(titleLb.mas_centerX);
  104. make.top.equalTo(titleLb.mas_bottom).offset(10);
  105. }];
  106. }
  107. -(void)removeYoungView{
  108. if (youngView) {
  109. [youngView removeFromSuperview];
  110. youngView = nil;
  111. }
  112. }
  113. #pragma mark--------初始化-------------
  114. -(void)initData{
  115. page = 1;
  116. self.infoArray = [NSMutableArray array];
  117. self.CarouselArray = [NSMutableArray array];
  118. self.classArray = [NSArray array];
  119. }
  120. -(void)viewWillAppear:(BOOL)animated
  121. {
  122. [super viewWillAppear:YES];
  123. if ([[YBYoungManager shareInstance]youngSwitch]) {
  124. [self showYoungTips];
  125. }else{
  126. [self removeYoungView];
  127. }
  128. }
  129. - (void)viewDidLoad {
  130. [super viewDidLoad];
  131. self.navigationController.interactivePopGestureRecognizer.delegate = nil;
  132. self.navigationController.navigationBarHidden = YES;
  133. self.view.backgroundColor = RGBA(235, 235, 235, 1);
  134. [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(removeYoungView) name:@"shopYongChange" object:nil];
  135. [self initData];
  136. [self addSearchBar];
  137. [self createCollectionView];
  138. [self createNoDataView];
  139. }
  140. -(void)createNoDataView{
  141. noDataView = [[UIView alloc]initWithFrame:CGRectMake(0, 200, _window_width, 40)];
  142. noDataView.hidden = YES;
  143. noDataView.backgroundColor = [UIColor clearColor];
  144. [_collectionView addSubview:noDataView];
  145. UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, _window_width, 20)];
  146. label1.font = [UIFont systemFontOfSize:14];
  147. label1.text = YZMsg(@"暂无商品");
  148. label1.textAlignment = NSTextAlignmentCenter;
  149. label1.textColor = RGB_COLOR(@"#333333", 1);
  150. [noDataView addSubview:label1];
  151. noDataView.hidden = YES;
  152. }
  153. #pragma mark--------添加搜索条---------begin--------
  154. - (void)addSearchBar {
  155. //加上 搜索栏
  156. searchBars = [[HXSearchBar alloc] initWithFrame:CGRectMake(10,66+statusbarHeight, _window_width-20,50)];
  157. searchBars.backgroundColor = [UIColor clearColor];
  158. // searchBars.delegate = self;
  159. //输入框提示
  160. searchBars.placeholder = YZMsg(@"请输入您要搜索的商品名称");
  161. //光标颜色
  162. searchBars.cursorColor = Pink_Cor;
  163. //TextField
  164. searchBars.searchBarTextField.layer.cornerRadius = 25;
  165. searchBars.searchBarTextField.layer.masksToBounds = YES;
  166. searchBars.searchBarTextField.backgroundColor = UIColor.whiteColor;
  167. //去掉取消按钮灰色背景
  168. searchBars.hideSearchBarBackgroundImage = YES;
  169. searchBars.searchBarTextField.font = [UIFont systemFontOfSize:14];
  170. [self.view addSubview:searchBars];
  171. [[UIBarButtonItem appearanceWhenContainedIn: [UISearchBar class], nil] setTintColor:[UIColor grayColor]];
  172. UIButton *searchBtn = [UIButton buttonWithType:0];
  173. searchBtn.frame = CGRectMake(0, 0, searchBars.width, searchBars.height);
  174. [searchBtn addTarget:self action:@selector(searchBarClick) forControlEvents:UIControlEventTouchUpInside];
  175. [searchBars addSubview:searchBtn];
  176. }
  177. -(void)headBtnClick{
  178. if ([[Config getOwnID] intValue] <= 0) {
  179. [PublicObj warnLogin];
  180. return;
  181. }
  182. ShopHomeVC *shop = [[ShopHomeVC alloc]init];
  183. shop.shop_name = YZMsg(@"直播小店");
  184. shop.shop_switch = self.shop_switch;
  185. [[YBBaseAppDelegate sharedAppDelegate] pushViewController:shop animated:YES];
  186. }
  187. -(void)collectionBtnClick{
  188. if ([[Config getOwnID] intValue] <= 0) {
  189. [PublicObj warnLogin];
  190. return;
  191. }
  192. // MyCollectionVC *collect = [[MyCollectionVC alloc]init];
  193. // [[MXBADelegate sharedAppDelegate]pushViewController:collect animated:YES];
  194. }
  195. -(void)searchBarClick{
  196. if ([[Config getOwnID] intValue] <= 0) {
  197. [PublicObj warnLogin];
  198. return;
  199. }
  200. ShopMallSearchVC *searchVC = [[ShopMallSearchVC alloc]init];
  201. [[YBBaseAppDelegate sharedAppDelegate]pushViewController:searchVC animated:YES];
  202. }
  203. #pragma mark--------添加搜索条---------end--------
  204. - (void)createCollectionHeaderView{
  205. if (collectionHeaderView) {
  206. [collectionHeaderView removeFromSuperview];
  207. collectionHeaderView = nil;
  208. }
  209. collectionHeaderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, _window_width, _window_width*0.3*2+20)];
  210. collectionHeaderView.backgroundColor = RGBA(235, 235, 235, 1);
  211. collectionHeaderView.clipsToBounds = YES;
  212. if (_CarouselArray.count > 0) {
  213. _cycleScroll = [[SDCycleScrollView alloc]initWithFrame:CGRectMake(10, 5, _window_width-20, _window_width*0.3)];
  214. _cycleScroll.delegate = self;
  215. _cycleScroll.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;
  216. [collectionHeaderView addSubview:_cycleScroll];
  217. _cycleScroll.scrollDirection = UICollectionViewScrollDirectionHorizontal;
  218. _cycleScroll.autoScrollTimeInterval = 3.0;//轮播时间间隔,默认1.0秒,可自定义
  219. _cycleScroll.currentPageDotColor = [UIColor whiteColor];
  220. _cycleScroll.pageDotColor = [[UIColor whiteColor] colorWithAlphaComponent:0.4];
  221. _cycleScroll.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;
  222. _cycleScroll.layer.cornerRadius = 5;
  223. _cycleScroll.layer.masksToBounds = YES;
  224. if (self.classArray.count > 12) {
  225. _mallClassView = [[ShopMallClassView alloc]initWithFrame:CGRectMake(10, _cycleScroll.bottom+5, _window_width-20, _window_width*0.3+30) andData:self.classArray];
  226. _mallClassView.delegate = self;
  227. [collectionHeaderView addSubview:_mallClassView];
  228. collectionHeaderView.size = CGSizeMake(_window_width, _window_width*0.3*2+40);
  229. }else if(self.classArray.count == 0){
  230. collectionHeaderView.size = CGSizeMake(_window_width, _window_width*0.3+40);
  231. }else{
  232. _mallClassView = [[ShopMallClassView alloc]initWithFrame:CGRectMake(10, _cycleScroll.bottom+5, _window_width-20, (_window_width*0.3)/2+30) andData:self.classArray];
  233. _mallClassView.delegate = self;
  234. [collectionHeaderView addSubview:_mallClassView];
  235. collectionHeaderView.size = CGSizeMake(_window_width, _window_width*0.3+(_window_width*0.3)/2+40);
  236. }
  237. }else{
  238. if (self.classArray.count > 12) {
  239. _mallClassView = [[ShopMallClassView alloc]initWithFrame:CGRectMake(10, 0, _window_width-20, _window_width*0.3+20) andData:self.classArray];
  240. _mallClassView.delegate = self;
  241. [collectionHeaderView addSubview:_mallClassView];
  242. collectionHeaderView.size = CGSizeMake(_window_width, _window_width*0.3+40);
  243. }else if(self.classArray.count == 0){
  244. collectionHeaderView.size = CGSizeMake(0, 0);
  245. }else{
  246. _mallClassView = [[ShopMallClassView alloc]initWithFrame:CGRectMake(10, 0, _window_width-20, (_window_width*0.3)/2+30) andData:self.classArray];
  247. _mallClassView.delegate = self;
  248. [collectionHeaderView addSubview:_mallClassView];
  249. collectionHeaderView.size = CGSizeMake(_window_width, (_window_width*0.3)/2+40);
  250. }
  251. }
  252. }
  253. #pragma mark ============轮播图点击=============
  254. -(void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
  255. NSString *uuuuuuu = minstr([_CarouselArray[index] valueForKey:@"slide_url"]);
  256. if ([PublicObj isUrlString:uuuuuuu]) {
  257. PubH5 *web = [[PubH5 alloc]init];
  258. web.url = uuuuuuu;
  259. [[YBBaseAppDelegate sharedAppDelegate] pushViewController:web animated:YES];
  260. }
  261. }
  262. -(int)getRandomCellHeight:(int)from to:(int)to{
  263. return (int)(from +(arc4random()%(to-from+1)));
  264. }
  265. -(void)createCollectionView{
  266. _flow = [[YBShopLayout alloc] init];
  267. _flow.delegate = self;
  268. _flow.flowLayoutStyle = 0;
  269. _collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0,64+50+statusbarHeight, _window_width, _window_height-64-statusbarHeight-50-ShowDiff-49) collectionViewLayout:_flow];
  270. _collectionView.backgroundColor = RGBA(235, 235, 235, 1);
  271. _collectionView.delegate = self;
  272. _collectionView.dataSource = self;
  273. [_collectionView registerNib:[UINib nibWithNibName:@"ShopMallCell" bundle:nil] forCellWithReuseIdentifier:@"ShopMallCell"];
  274. [_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"hotHeaderV"];
  275. [self.view addSubview:_collectionView];
  276. _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  277. _collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
  278. page = 1;
  279. [self pullInternet];
  280. }];
  281. _collectionView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
  282. page ++;
  283. [self pullInternet];
  284. }];
  285. [self pullInternet];
  286. }
  287. -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
  288. return _infoArray.count;
  289. }
  290. - (CGSize)waterFlowLayout:(YBShopLayout *)waterFlowLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
  291. {
  292. int height =[self getRandomCellHeight:(_window_width-21)/2 + 75 to:(_window_width-21)/2 + 250];
  293. return CGSizeMake((_window_width-21)/2, height);
  294. }
  295. /** 列数*/
  296. -(CGFloat)columnCountInWaterFlowLayout:(YBShopLayout *)waterFlowLayout{
  297. return 2;
  298. }
  299. /** 列间距*/
  300. -(CGFloat)columnMarginInWaterFlowLayout:(YBShopLayout *)waterFlowLayout{
  301. return 10;
  302. }
  303. /** 边缘之间的间距*/
  304. -(UIEdgeInsets)edgeInsetInWaterFlowLayout:(YBShopLayout *)waterFlowLayout{
  305. return UIEdgeInsetsMake(10, 10, 10, 10);
  306. }
  307. -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
  308. [collectionView deselectItemAtIndexPath:indexPath animated:YES];
  309. NSDictionary *subDic = _infoArray[indexPath.row];
  310. [PublicObj checkGoodsExistenceWithID:minstr([subDic valueForKey:@"id"]) Existence:^(int code, NSString *msg) {
  311. if (code == 0) {
  312. if ([minstr([subDic valueForKey:@"type"]) isEqual:@"1"]) {
  313. OutsideGoodsDetailVC *detail = [[OutsideGoodsDetailVC alloc]init];
  314. detail.goodsID = minstr([subDic valueForKey:@"id"]);
  315. detail.liveUid = @"0";
  316. [[YBBaseAppDelegate sharedAppDelegate] pushViewController:detail animated:YES];
  317. }else{
  318. CommodityDetailVC *detail = [[CommodityDetailVC alloc]init];
  319. detail.goodsID = minstr([subDic valueForKey:@"id"]);
  320. detail.liveUid = @"0";
  321. [[YBBaseAppDelegate sharedAppDelegate] pushViewController:detail animated:YES];
  322. }
  323. }else{
  324. [MBProgressHUD showError:msg];
  325. }
  326. }];
  327. }
  328. -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
  329. ShopMallCell *cell = (ShopMallCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"ShopMallCell" forIndexPath:indexPath];
  330. NSDictionary *subDic = _infoArray[indexPath.row];
  331. [cell.thumbImgV sd_setImageWithURL:[NSURL URLWithString:minstr([subDic valueForKey:@"thumb"])]];
  332. cell.titleL.text = minstr([subDic valueForKey:@"name"]);
  333. cell.priceL.text = [NSString stringWithFormat:@"¥%@",minstr([subDic valueForKey:@"price"])];
  334. //type 商品类型 0 站内商品 1 外链商品
  335. if ([minstr([subDic valueForKey:@"type"]) isEqual:@"1"]) {
  336. cell.lineLb.hidden = NO;
  337. cell.sellCountLb.text = [NSString stringWithFormat:@"¥%@",minstr([subDic valueForKey:@"original_price"])];
  338. }else{
  339. cell.lineLb.hidden = YES;
  340. cell.sellCountLb.text =[NSString stringWithFormat:@"%@%@%@",YZMsg(@"已售"),minstr([subDic valueForKey:@"sale_nums"]),YZMsg(@"件")];
  341. }
  342. // cell.backgroundColor = Normal_Color;
  343. cell.titleL.textColor = UIColor.blackColor;
  344. return cell;
  345. }
  346. #pragma mark ================ collectionview头视图 ===============
  347. - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{
  348. if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {
  349. UICollectionReusableView *header = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"hotHeaderV" forIndexPath:indexPath];
  350. header.backgroundColor = [UIColor whiteColor];
  351. [header addSubview:collectionHeaderView];
  352. return header;
  353. }else{
  354. return nil;
  355. }
  356. }
  357. /** 头视图Size */
  358. -(CGSize )waterFlowLayout:(YBShopLayout *)waterFlowLayout sizeForHeaderViewInSection:(NSInteger)section{
  359. if (_CarouselArray.count == 0) {
  360. if (self.classArray.count > 12) {
  361. return CGSizeMake(_window_width, _window_width*0.3+40);
  362. }else if(self.classArray.count == 0){
  363. return CGSizeMake(0, 0);
  364. }else{
  365. return CGSizeMake(_window_width, (_window_width*0.3)/2+40);
  366. }
  367. }
  368. if (self.classArray.count > 12) {
  369. return CGSizeMake(_window_width, _window_width*0.3*2+40);
  370. }else if(self.classArray.count == 0){
  371. return CGSizeMake(_window_width, _window_width*0.3+30);
  372. }else{
  373. return CGSizeMake(_window_width, _window_width*0.3+(_window_width*0.3)/2+40);
  374. }
  375. }
  376. - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
  377. if (_CarouselArray.count == 0) {
  378. if (self.classArray.count > 12) {
  379. return CGSizeMake(_window_width, _window_width*0.3+40);
  380. }else if(self.classArray.count == 0){
  381. return CGSizeMake(0, 0);
  382. }else{
  383. return CGSizeMake(_window_width, (_window_width*0.3)/2+40);
  384. }
  385. }
  386. if (self.classArray.count > 12) {
  387. return CGSizeMake(_window_width, _window_width*0.3*2+40);
  388. }else if(self.classArray.count == 0){
  389. return CGSizeMake(_window_width, _window_width*0.3+30);
  390. }else{
  391. return CGSizeMake(_window_width, _window_width*0.3+(_window_width*0.3)/2+40);
  392. }
  393. }
  394. #pragma mark--------分类代理--------
  395. -(void)selectClassData:(NSDictionary *)dic
  396. {
  397. ShopMallDetailVC *detail = [[ShopMallDetailVC alloc]init];
  398. detail.classDic = dic;
  399. [[YBBaseAppDelegate sharedAppDelegate]pushViewController:detail animated:YES];
  400. }
  401. -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
  402. lastContentOffset = scrollView.contentOffset.y;
  403. }
  404. -(void)scrollViewDidScroll:(UIScrollView *)scrollView {
  405. if (scrollView.contentOffset.y < lastContentOffset)
  406. {
  407. [self showTabBar];
  408. // [self.navigationController setNavigationBarHidden:NO animated:YES];//向上
  409. } else if (scrollView.contentOffset.y > lastContentOffset)
  410. {
  411. // [self.navigationController setNavigationBarHidden:YES animated:YES];//向下
  412. [self hideTabBar];
  413. }
  414. }
  415. #pragma mark ================ 隐藏和显示tabbar ===============
  416. - (void)hideTabBar {
  417. // if (self.tabBarController.tabBar.hidden == YES) {
  418. // return;
  419. // }
  420. // self.tabBarController.tabBar.hidden = YES;
  421. // ZYTabBar *tabbar = (ZYTabBar *)self.tabBarController.tabBar;
  422. // tabbar.plusBtn.hidden = YES;
  423. }
  424. - (void)showTabBar
  425. {
  426. // if (self.tabBarController.tabBar.hidden == NO)
  427. // {
  428. // return;
  429. // }
  430. // self.tabBarController.tabBar.hidden = NO;
  431. // ZYTabBar *tabbar = (ZYTabBar *)self.tabBarController.tabBar;
  432. // tabbar.plusBtn.hidden = NO;
  433. }
  434. @end