BogoHomeViewController.m 19 KB

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