BGTabBarCenterView.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // BGTabBarCenterView.m
  3. // BuguLive
  4. //
  5. // Created by 宋晨光 on 2019/1/12.
  6. // Copyright © 2019年 xfg. All rights reserved.
  7. //
  8. #import "BGTabBarCenterView.h"
  9. //#import "TXRTMPSDK/TXUGCRecord.h"
  10. //#import <TXLiteAVSDK_UGC/TXUGCRecord.h>
  11. @implementation BGTabBarCenterView
  12. - (instancetype)initWithFrame:(CGRect)frame
  13. {
  14. self = [super initWithFrame:frame];
  15. if (self) {
  16. [self setUpView];
  17. }
  18. return self;
  19. }
  20. -(void)setUpView{
  21. self.leftBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
  22. [self.leftBtn setImage:[UIImage imageNamed:@"dialog_start_live"] forState:UIControlStateNormal];
  23. [self.leftBtn setTitle:ASLocalizedString(@"立即查看")forState:UIControlStateNormal];
  24. [self.leftBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
  25. self.rightBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
  26. [self.rightBtn setImage:[UIImage imageNamed:@"dialog_take_photo"] forState:UIControlStateNormal];
  27. [self.rightBtn setTitle:ASLocalizedString(@"发布动态")forState:UIControlStateNormal];
  28. [self.rightBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
  29. [self addSubview:self.leftBtn];
  30. [self addSubview:self.rightBtn];
  31. }
  32. - (void)layoutSubviews {
  33. [super layoutSubviews];
  34. self.leftBtn.frame = CGRectMake(0, 20, kScreenW / 2, kScreenH / 2 - 20);
  35. self.rightBtn.frame = CGRectMake(kScreenW / 2, 20, kScreenW / 2, kScreenH / 2 - 20);
  36. }
  37. -(void)btnClick:(UIButton *)sender{
  38. }
  39. @end