// // BGTabBarController.m // BuguLive // // Created by xfg on 2017/6/26. // Copyright © 2017年 xfg. All rights reserved. // #import "BGTabBarController.h" #import "BGTabBar.h" #import "BGNavigationController.h" #import "HMHomeViewController.h" #import "PublishLivestViewController.h" #import "AgreementViewController.h" #import "MPersonCenterVC.h" #import "MSmallVideoVC.h" #import "ListDayViewController.h" #import "LeaderboardViewController.h" #import "SChargerVC.h" #import "LEEAlertHelper.h" #import "LEEAlert.h" #import "HMCenterPopView.h" #import "SmallVideoViewController.h" #import "CustomPagerController.h" #import "AppDelegate.h" #import "NewSmallVideoViewController.h" #import "TCVideoRecordViewController.h" #import "YHTimeLineViewController.h" #import "MGAlertIncodeView.h" #import "UpgradeTipView.h" //#import #import #import //主页 #import "BogoHomeViewController.h" //广场 #import "BogoSquareViewController.h" //消息 #import "BogoNewsViewController.h" //青少年模式弹窗 #import "BogoYounthModePopView.h" #import "SIdentificationVC.h" #import "IMALoginParam.h" #import "BogoNewsTabNumModel.h" #import "MineViewController.h" #import "BogoShopKit.h" #import "BogoYouthModeViewController.h" #import "BogoYoungModeVideoViewController.h" #import "BogoYoungModeVideoViewController.h" #import "BogoNewSquareViewController.h" #import "VoiceHomeListViewController.h" #import "GKDBViewController.h" #import "GKAllRefreshViewController.h" #import "AudioChatTool.h" @interface BGTabBarController () @property (nonatomic, strong) HMCenterPopView *popView; @property (nonatomic, strong) VideoDynamicViewC *videoDynamicViewC; @property(nonatomic, strong) MGAlertIncodeView *alertView; @property(nonatomic, strong) BogoYounthModePopView *youthView; @property(nonatomic, strong) UIView *tipView; @end @implementation BGTabBarController BogoSingletonM(Instance); - (void)viewDidLoad { [super viewDidLoad]; [[GiftListManager sharedInstance] reloadGiftList]; [BGIMMsgHandler sharedInstance]; [BGIMPrivateMsgHandler sharedInstance]; if ([BGIMLoginManager sharedInstance].isIMSDKOK) { NSLog(@"已经登录了"); }else{ NSLog(@"没有"); [[BGIMLoginManager sharedInstance] loginImSDK:YES succ:nil failed:nil]; } self.delegate = self; // [self setupCustomTabBar]; [self setUpChildViewControllers]; self.view.backgroundColor = kWhiteColor; self.alertView = [MGAlertIncodeView new]; self.alertView.frame = CGRectMake(0, 0, kScreenW, kScreenH); self.alertView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4]; FWWeakify(self) self.alertView.clickBlock = ^(NSInteger i) { FWStrongify(self) if (i == 0) { // [self.alertView removeAllSubViews]; self.alertView.hidden = YES; } }; self.alertView.hidden = YES; [self.view addSubview:self.alertView]; if (kIsCheckingVersion()) { } else { #ifdef DEBUG #else [self checkCode]; #endif } // [[UIBarButtonItem appearance]setTitleTextAttributes:@{NSForegroundColorAttributeName:kClearColor, // NSFontAttributeName:[UIFont systemFontOfSize:20.0] // } forState:UIControlStateNormal]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(isOpenYoung:) name:@"isOpenYoung" object:nil]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDarkContent]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(IMChatMsgNotfication:) name:g_notif_chatmsg object:nil]; } - (void)getGiftNumber { NSMutableDictionary *dict = [[NSMutableDictionary alloc]init]; [dict setValue:@"deal" forKey:@"ctl"]; [dict setValue:@"get_gift_quantity" forKey:@"act"]; [[NetHttpsManager manager] POSTWithParameters:dict SuccessBlock:^(NSDictionary *responseJson) { NSLog(@"104responseJson%@",responseJson); if ([responseJson toInt:@"status"] == 1) { NSArray *list = responseJson[@"data"]; [GlobalVariables sharedInstance].giftQuantityModelList = [NSArray modelArrayWithClass:GiftQuantityModel.class json:list]; // for (int i = 0; i