BogoHomeViewController.m 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. //
  2. // BogoHomeViewController.m
  3. // BuguLive
  4. //
  5. // Created by 宋晨光 on 2021/3/18.
  6. // Copyright © 2021 xfg. All rights reserved.
  7. //
  8. #import "BogoHomeViewController.h"
  9. #import "NewestViewController.h"
  10. #import "BogoHomeTopView.h"
  11. #import "VideoViewController.h"
  12. #import "BogoSquarePopView.h"
  13. #import "ReleaseDynamicVC.h"
  14. #import "HMVideoPlayerViewController.h"
  15. #import "MGSignHomeSuccessView.h"
  16. #import "VoiceHomeListViewController.h"
  17. #import "MLMSegmentManager.h"
  18. #import "GKDBViewController.h"
  19. #import "GameListViewController.h"
  20. @interface BogoHomeViewController ()<MLMSegmentHeadDelegate,PushToLiveControllerDelegate,UITextFieldDelegate,BogoHomeTopViewDelegate>
  21. @property (nonatomic, strong) NSMutableArray *itemTitleMutableArray; // 完整的分类标题容器
  22. @property (nonatomic, strong) NSMutableArray *classifiedModelMutableArray; // 服务端下发分类的模型容器
  23. @property (nonatomic, strong) NSMutableArray *videoVCMutableArray; // 服务端下发分类的对应的控制器容器
  24. @property(nonatomic, strong) NSArray *listArr;
  25. @property(nonatomic, strong) BogoHomeTopView *topView;
  26. @property (nonatomic,strong) BogoSquarePopView *AddSquarreView;
  27. @property(nonatomic, strong) UIButton *publishBtn;
  28. @property(nonatomic, strong) LivingModel *model;
  29. @property(nonatomic, strong) NSArray *modelArr;
  30. @property(nonatomic, assign) NSInteger currentIndex;
  31. @property(nonatomic, strong) NSString *password;
  32. @property (nonatomic,strong) NSArray *vcs;
  33. @end
  34. @implementation BogoHomeViewController
  35. - (void)viewDidLoad {
  36. [super viewDidLoad];
  37. // Do any additional setup after loading the view.
  38. UIImageView *topImgView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, SCREEN_HEIGHT)];
  39. topImgView.image = [UIImage imageNamed:@"lg_bg"];
  40. [self.view addSubview:topImgView];
  41. // [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:animated];
  42. [self.view addSubview:self.topView];
  43. [self setUpSegView];
  44. [self reloadUserInfoWithOne:YES];
  45. [self.topView setHidden:YES];
  46. [self.view addSubview:self.publishBtn];
  47. }
  48. - (void)viewWillAppear:(BOOL)animated {
  49. [super viewWillAppear:animated];
  50. self.navigationController.navigationBarHidden = YES;
  51. if (@available(iOS 13.0, *)) {
  52. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:animated];
  53. } else {
  54. // Fallback on earlier versions
  55. }
  56. if (self.videoVCMutableArray.count < 1) {
  57. // [self updateClassiFiedVC];
  58. }
  59. [self reloadUserInfoWithOne:NO];
  60. }
  61. -(void)reloadUserInfoWithOne:(BOOL)isOne{
  62. NSMutableDictionary *parmDict = [NSMutableDictionary dictionary];
  63. [parmDict setObject:@"user" forKey:@"ctl"];
  64. [parmDict setObject:@"userinfo" forKey:@"act"];
  65. FWWeakify(self)
  66. [[NetHttpsManager manager] POSTWithParameters:parmDict SuccessBlock:^(NSDictionary *responseJson)
  67. {
  68. FWStrongify(self)
  69. if ([responseJson toInt:@"status"] == 1)
  70. {
  71. UserModel *model = [UserModel mj_objectWithKeyValues:[responseJson objectForKey:@"user"]];
  72. [GlobalVariables sharedInstance].is_noble_mysterious = model.is_noble_mysterious;
  73. [GlobalVariables sharedInstance].userModel = model;
  74. // if (isOne) {
  75. // [[NSNotificationCenter defaultCenter] postNotificationName:@"isOpenYoung" object:nil];
  76. // }
  77. }else
  78. {
  79. [FanweMessage alertHUD:[responseJson toString:@"error"]];
  80. }
  81. } FailureBlock:^(NSError *error)
  82. {
  83. FWStrongify(self)
  84. }];
  85. }
  86. -(void)setUpSegView{
  87. self.itemTitleMutableArray = [NSMutableArray array];
  88. self.videoVCMutableArray = [NSMutableArray array];
  89. _listArr = @[ASLocalizedString(@"视频"),ASLocalizedString(@"推荐"),ASLocalizedString(@"关注"),ASLocalizedString(@"最新"),ASLocalizedString(@"游戏")];
  90. // _listArr = @[ASLocalizedString(@"关注"),ASLocalizedString(@"推荐")];
  91. [self.itemTitleMutableArray addObjectsFromArray:_listArr];
  92. // 动态添加视频分类
  93. for (VideoClassifiedModel *model in [GlobalVariables sharedInstance].appModel.video_classified)
  94. {
  95. [self.itemTitleMutableArray addObject:model.title];
  96. }
  97. /*_segHead = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(kRealValue(12), kTopHeight + kRealValue(5), kScreenW - kRealValue(24), kRealValue(50)) titles:self.itemTitleMutableArray headStyle:SegmentHeadStyleSlide layoutStyle:MLMSegmentLayoutCenter];
  98. //tab颜色
  99. _segHead.selectColor = kWhiteColor;
  100. _segHead.delegate = self;
  101. _segHead.fontScale = 1;
  102. // _segHead.lineHeight = 0;
  103. // _segHead.lineColor = kClearColor;
  104. _segHead.fontSize = 14;
  105. //滑块设置
  106. _segHead.slideHeight = kRealValue(32);
  107. _segHead.slideCorner = 4;
  108. _segHead.moreButton_width = kRealValue(64);
  109. _segHead.singleW_Add = kRealValue(64);
  110. _segHead.slideColor = nil;
  111. // _segHead.slideScale = 1.5;
  112. _segHead.deSelectColor = [UIColor colorWithHexString:@"#EBDBFC"];
  113. _segHead.btnBgImg = @"bogo_home_top_bgSelectImg";
  114. _segHead.btnBeforeBgImg = @"bogo_home_top_bgBeforeImg";
  115. _segHead.bottomLineHeight = 0;
  116. _segHead.headColor = kClearColor;
  117. _segHead.deSelectColor = kBlackColor;
  118. */
  119. _segHead = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(kRealValue(9.5), kStatusBarHeight - kRealValue(8), kScreenW - kRealValue(170), kRealValue(46)) titles:self.itemTitleMutableArray headStyle:SegmentHeadStyleLine layoutStyle:MLMSegmentLayoutLeft];
  120. //tab颜色
  121. _segHead.lineScale = 0.3;
  122. _segHead.selectColor = [UIColor colorWithHexString:@"#000000"];;
  123. _segHead.delegate = self;
  124. _segHead.fontScale = 1.2;
  125. // _segHead.lineHeight = 0;
  126. // _segHead.lineColor = kClearColor;
  127. _segHead.fontSize = 15;
  128. // _segHead.tag = 1101;
  129. _segHead.lineColor = [UIColor colorWithHexString:@"#78FFCB"];
  130. _segHead.lineHeight = kRealValue(3);
  131. _segHead.lineScale = 0.3;
  132. //滑块设置
  133. // _segHead.slideHeight = kRealValue(32);
  134. // _segHead.slideCorner = 4;
  135. // _segHead.moreButton_width = kRealValue(64);
  136. // _segHead.singleW_Add = kRealValue(64);
  137. // _segHead.slideColor = nil;
  138. // _segHead.slideScale = 1.5;
  139. _segHead.deSelectColor = [UIColor colorWithHexString:@"#808080"];
  140. // _segHead.btnBgImg = @"bogo_home_top_bgSelectImg";
  141. // _segHead.btnBeforeBgImg = @"bogo_home_top_bgBeforeImg";
  142. _segHead.bottomLineHeight = 0;
  143. _segHead.headColor = kClearColor;
  144. // _segHead.deSelectColor = [UIColor colorWithHexString:@"#FFFFFF"];
  145. self.vcs = [self vcArr:_listArr.count];
  146. self.view.backgroundColor = kClearColor;
  147. _segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, kStatusBarHeight - kRealValue(8) + 46 + 10, SCREEN_WIDTH, SCREEN_HEIGHT-CGRectGetMaxY(_segHead.frame) - kNavigationBarHeight - 40) vcOrViews:self.vcs];
  148. _segScroll.loadAll = NO;
  149. _segScroll.showIndex = 0;
  150. [MLMSegmentManager associateHead:_segHead withScroll:_segScroll completion:^{
  151. [self.view addSubview:_segHead];
  152. [self.view addSubview:_segScroll];
  153. }];
  154. // [self updateClassiFiedVC];
  155. self.publishBtn.centerY = _segHead.centerY+8;
  156. }
  157. - (void)updateClassiFiedVC
  158. {
  159. CGFloat viewWidth = CGRectGetWidth(self.view.frame);
  160. @synchronized (self)
  161. {
  162. // 动态添加视频分类
  163. for (VideoClassifiedModel *model in [GlobalVariables sharedInstance].appModel.video_classified)
  164. {
  165. [self.itemTitleMutableArray addObject:model.title];
  166. }
  167. self.classifiedModelMutableArray = [GlobalVariables sharedInstance].appModel.video_classified;
  168. for (NSInteger i = 0; i < self.classifiedModelMutableArray.count; ++i)
  169. {
  170. // 服务端下发的分类的在完整的分类容器中的起点
  171. VideoViewController *videoVC = [[VideoViewController alloc] init];
  172. VideoClassifiedModel * model = [[GlobalVariables sharedInstance].appModel.video_classified objectAtIndex:i];
  173. videoVC.viewFrame = CGRectMake(0, 0, kScreenW, kScreenH - kTabBarHeight - kRealValue(5) - kRealValue(50) - kTopHeight);
  174. videoVC.view.frame = CGRectMake(0, 0, kScreenW, kScreenH - kTabBarHeight - kRealValue(5) - kRealValue(50) - kTopHeight);
  175. videoVC.classified_id = model.classified_id;
  176. [self.videoVCMutableArray addObject:videoVC];
  177. }
  178. }
  179. // [self.segHead addMoreTitles:self.itemTitleMutableArray];
  180. // [self.segScroll addVcOrViews:self.videoVCMutableArray];
  181. }
  182. #pragma mark - 数据源
  183. - (NSArray *)vcArr:(NSInteger)count
  184. {
  185. NSMutableArray *arr = [NSMutableArray array];
  186. FocusOnViewController *focusVC = [[FocusOnViewController alloc]init];
  187. focusVC.delegate = self;
  188. focusVC.collectionViewFrame = CGRectMake(0, 0, kScreenW, kScreenH - self.segHead.bottom - kTabBarHeight - kRealValue(50) + kRealValue(10) );
  189. NewestViewController *concertVC = [NewestViewController new];
  190. concertVC.types = @"1";
  191. concertVC.delegate = self;
  192. concertVC.collectionViewFrame = CGRectMake(0, 0, kScreenW, kScreenH - self.segHead.bottom - MG_BOTTOM_MARGIN );
  193. NewestViewController *recommandVC = [NewestViewController new];
  194. recommandVC.delegate = self;
  195. recommandVC.types = @"1";
  196. recommandVC.delegate = self;
  197. recommandVC.collectionViewFrame = CGRectMake(0, 0, kScreenW, kScreenH - self.segHead.bottom - MG_BOTTOM_MARGIN - kRealValue(5) );
  198. NewestViewController *nearbyVC = [[NewestViewController alloc]init];
  199. nearbyVC.delegate = self;
  200. nearbyVC.types = @"2";
  201. //附近和推荐不一样
  202. nearbyVC.collectionViewFrame = CGRectMake(0, 0, kScreenW, kScreenH - kTopHeight - kTabBarHeight - kRealValue(50) - MG_BOTTOM_MARGIN + kRealValue(56) - kRealValue(10));
  203. VoiceHomeListViewController *voiceRoom = [VoiceHomeListViewController new];
  204. voiceRoom.types = @"1";
  205. voiceRoom.delegate = self;
  206. voiceRoom.topViewdelegate = self;
  207. GameListViewController *gameVc = [[GameListViewController alloc] init];
  208. // xiaoshipinBottom = 64 + 50;
  209. HMVideoPlayerViewController *vc = [[HMVideoPlayerViewController alloc]initWithVideos:@[] index:0 IsPushed:NO requestDict:nil];
  210. WeakSelf
  211. vc.isRefreshVideoBlock = ^(BOOL isRefresh) {
  212. // [weakSelf refreshHeader];
  213. };
  214. // [[AppDelegate sharedAppDelegate] pushViewController:vc animated:YES];
  215. [arr addObject:vc];
  216. [arr addObject:recommandVC];
  217. [arr addObject:focusVC];
  218. [arr addObject:nearbyVC];
  219. [arr addObject:gameVc];
  220. if (self.classifiedModelMutableArray.count > 0)
  221. {
  222. }
  223. self.classifiedModelMutableArray = [GlobalVariables sharedInstance].appModel.video_classified;
  224. for (NSInteger i = 0; i < self.classifiedModelMutableArray.count; ++i)
  225. {
  226. // 服务端下发的分类的在完整的分类容器中的起点
  227. VideoViewController *videoVC = [[VideoViewController alloc] init];
  228. VideoClassifiedModel * model = [[GlobalVariables sharedInstance].appModel.video_classified objectAtIndex:i];
  229. videoVC.viewFrame = CGRectMake(0, 0, kScreenW, kScreenH - kTabBarHeight - kRealValue(5) - kRealValue(50) - kTopHeight);
  230. videoVC.view.frame = CGRectMake(0, 0, kScreenW, kScreenH - kTabBarHeight - kRealValue(5) - kRealValue(50) - kTopHeight);
  231. videoVC.classified_id = model.classified_id;
  232. [arr addObject:videoVC];
  233. }
  234. return arr;
  235. }
  236. //输入密码
  237. -(void)clickPasswordActionDelegateWithPassWord:(NSString *)password{
  238. WeakSelf
  239. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:ASLocalizedString(@"请输入房间密码")preferredStyle:UIAlertControllerStyleAlert];
  240. [alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
  241. textField.placeholder = ASLocalizedString(@"请输入密码");
  242. textField.delegate = self;
  243. textField.keyboardType = UIKeyboardTypeNumberPad;
  244. [textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
  245. }];
  246. UIAlertAction *actionCacel = [UIAlertAction actionWithTitle:ASLocalizedString(@"取消")style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
  247. }];
  248. [alertController addAction:actionCacel];
  249. UIAlertAction *actionConfirm = [UIAlertAction actionWithTitle:ASLocalizedString(@"确定")style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  250. NSString *md5Str = [[NSString md5String:self.password] uppercaseString];
  251. //转化为大写
  252. NSLog(@"%@",md5Str);
  253. NSLog(@"%@",password);
  254. if ([md5Str isEqualToString:self.model.password]) {
  255. [self pushToLiveController:_model modelArr:_modelArr isFirstJump:NO];
  256. }else{
  257. [FanweMessage alertHUD:ASLocalizedString(@"密码不正确")];
  258. }
  259. }];
  260. [alertController addAction:actionConfirm];
  261. [self presentViewController:alertController animated:YES completion:nil];
  262. }
  263. -(void)textFieldDidChangeSelection:(UITextField *)textField{
  264. self.password = textField.text;
  265. }
  266. -(void)textFieldDidChange:(UITextField *)textField{
  267. self.password = textField.text;
  268. }
  269. -(void)didSelectedIndex:(NSInteger)index{
  270. if (index == 0){
  271. [self.publishBtn setHidden:NO];
  272. [self.topView setHidden:YES];
  273. }else{
  274. [self.publishBtn setHidden:YES];
  275. [self.topView setHidden:NO];
  276. }
  277. _segScroll.showIndex = index;
  278. // [_segScroll addViewCacheIndex:index];
  279. [_segScroll createView];
  280. if (index != 0){
  281. HMVideoPlayerViewController *vc = self.vcs[0];
  282. if (vc.videoView.player) {
  283. [vc.videoView.player pausePlay];
  284. }
  285. }
  286. }
  287. #pragma mark - 点击事件
  288. -(void)clickPublish:(UIButton *)sender{
  289. self.AddSquarreView.listArr = @[ASLocalizedString(@"短视频")];
  290. // self.popView.frame = CGRectMake(kScreenW - kRealValue(98 + 22), self.publishBtn.bottom, kRealValue(90), kRealValue(98));
  291. [self.AddSquarreView show:[UIApplication sharedApplication].keyWindow frame:CGRectMake(kScreenW - kRealValue(98), self.publishBtn.bottom, kRealValue(90), kRealValue(40 * self.AddSquarreView.listArr.count) + kRealValue(10))];
  292. self.AddSquarreView.clickIndexBlock = ^(NSInteger index) {
  293. if (index == 0) {
  294. if (self.clickSquareBtnBlock) {
  295. self.clickSquareBtnBlock(index);
  296. }
  297. }else{
  298. [self popDynamicView];
  299. // [self.dynamicVC handleSearchEvent];
  300. }
  301. };
  302. }
  303. -(void)popDynamicView{
  304. ReleaseDynamicVC *pushVC = [ReleaseDynamicVC new];
  305. __weak __typeof(self)weakSelf = self;
  306. pushVC.postFinishBlock = ^(BOOL isFinish) {
  307. if (isFinish) {
  308. [[NSNotificationCenter defaultCenter]postNotificationName:KBogoTimeReloadList object:nil];
  309. }
  310. };
  311. [[AppDelegate sharedAppDelegate]presentViewController:pushVC animated:YES completion:nil];
  312. }
  313. #pragma mark NewestViewController跳转到直播
  314. -(void)pushToLiveController:(LivingModel *)model modelArr:(NSArray *)modelArr isFirstJump:(BOOL)isFirstJump
  315. {
  316. _model = model;
  317. _modelArr = modelArr;
  318. if (![BGUtils isNetConnected])
  319. {
  320. return;
  321. }
  322. if (isFirstJump) {
  323. self.password = @"";
  324. }
  325. if (![BGUtils isBlankString:model.password] && isFirstJump) {
  326. [self clickPasswordActionDelegateWithPassWord:model.password];
  327. return;
  328. }
  329. [[GlobalVariables sharedInstance].newestLivingMArray removeAllObjects];
  330. [[GlobalVariables sharedInstance].newestLivingMArray addObject:model];
  331. if ([self checkUser:[IMAPlatform sharedInstance].host])
  332. {
  333. TCShowLiveListItem *item = [[TCShowLiveListItem alloc]init];
  334. item.chatRoomId = model.group_id;
  335. item.avRoomId = model.room_id;
  336. item.title = StringFromInt(model.room_id);
  337. item.vagueImgUrl = model.head_image;
  338. item.is_voice = model.is_voice;
  339. TCShowUser *showUser = [[TCShowUser alloc]init];
  340. showUser.uid = model.user_id;
  341. showUser.avatar = model.head_image;
  342. item.host = showUser;
  343. if (model.live_in == FW_LIVE_STATE_ING)
  344. {
  345. item.liveType = FW_LIVE_TYPE_AUDIENCE;
  346. }
  347. // else if (model.live_in == FW_LIVE_STATE_RELIVE)
  348. // {
  349. // item.liveType = FW_LIVE_TYPE_RELIVE;
  350. // [GlobalVariables sharedInstance].appModel.spear_live = @"0";
  351. // }
  352. if ([LiveCenterManager sharedInstance].itemModel) {
  353. [[NSNotificationCenter defaultCenter]postNotificationName:@"clickLiveRoomNotification" object:nil];
  354. }
  355. [LiveCenterManager sharedInstance].itemModel=item;
  356. BOOL isSusWindow = [[LiveCenterManager sharedInstance] judgeIsSusWindow];
  357. [[LiveCenterManager sharedInstance] showLiveOfAudienceLiveofTCShowLiveListItem:item modelArr:modelArr isSusWindow:isSusWindow isSmallScreen:NO block:^(BOOL finished) {
  358. }];
  359. }
  360. else
  361. {
  362. [[BGHUDHelper sharedInstance] loading:@"" delay:2 execute:^{
  363. [[BGIMLoginManager sharedInstance] loginImSDK:YES succ:nil failed:nil];
  364. } completion:^{
  365. }];
  366. }
  367. }
  368. - (BOOL)checkUser:(id<IMHostAble>)user
  369. {
  370. if (![user conformsToProtocol:@protocol(AVUserAble)])
  371. {
  372. return NO;
  373. }
  374. return YES;
  375. }
  376. #pragma mark - 判断当日是否签到
  377. - (void)requestDataToady{
  378. NSMutableDictionary *parmDict = [NSMutableDictionary dictionary];
  379. [parmDict setObject:@"index" forKey:@"ctl"];
  380. [parmDict setObject:@"is_signin" forKey:@"act"];
  381. FWWeakify(self)
  382. [[NetHttpsManager manager] POSTWithParameters:parmDict SuccessBlock:^(NSDictionary *responseJson) {
  383. FWStrongify(self)
  384. if ([responseJson toInt:@"today_signin"] == 0) {
  385. [MGSignHomeSuccessView showTodaySignSuccessViewGift:@"" frame:CGRectMake(0, 0, kScreenW, kScreenH) WithComplete:^{
  386. }];
  387. }
  388. } FailureBlock:^(NSError *error) {
  389. }];
  390. }
  391. -(BogoHomeTopView *)topView{
  392. if (!_topView) {
  393. _topView = [[BogoHomeTopView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, kRealValue(44) + StatusBarHeight)];
  394. _topView.delegate = self;
  395. }
  396. return _topView;
  397. }
  398. -(BogoSquarePopView *)AddSquarreView{
  399. if (!_AddSquarreView) {
  400. _AddSquarreView = [[BogoSquarePopView alloc]initWithFrame:CGRectMake(0, 0, kRealValue(90), kRealValue(98))];
  401. }
  402. return _AddSquarreView;
  403. }
  404. -(UIButton *)publishBtn{
  405. if (!_publishBtn) {
  406. _publishBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  407. _publishBtn.frame = CGRectMake(kScreenW - kRealValue(44) - kRealValue(10), StatusBarHeight+8, kRealValue(44), kRealValue(44));
  408. [_publishBtn setImage:[UIImage imageNamed:@"bogo_publish_btn"] forState:UIControlStateNormal];
  409. [_publishBtn addTarget:self action:@selector(clickPublish:) forControlEvents:UIControlEventTouchUpInside];
  410. }
  411. return _publishBtn;
  412. }
  413. - (void)clickLiveBtn
  414. {
  415. if(self.topViewdelegate && [self.topViewdelegate respondsToSelector:@selector(clickLiveBtn)]){
  416. [self.topViewdelegate clickLiveBtn];
  417. }
  418. }
  419. /*
  420. #pragma mark - Navigation
  421. // In a storyboard-based application, you will often want to do a little preparation before navigation
  422. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  423. // Get the new view controller using [segue destinationViewController].
  424. // Pass the selected object to the new view controller.
  425. }
  426. */
  427. @end