BGOtherPushPopView.m 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // BGOtherPushPopView.m
  3. // BuguLive
  4. //
  5. // Created by Mac on 2021/8/13.
  6. // Copyright © 2021 xfg. All rights reserved.
  7. //
  8. #import "BGOtherPushPopView.h"
  9. #import "CurrentLiveInfo.h"
  10. @interface BGOtherPushPopView ()
  11. @property (weak, nonatomic) IBOutlet UILabel *rtmpLabel;
  12. @property (weak, nonatomic) IBOutlet UILabel *contentLabel;
  13. @end
  14. @implementation BGOtherPushPopView
  15. - (void)awakeFromNib{
  16. [super awakeFromNib];
  17. self.frame = CGRectMake((kScreenW - 290 ) / 2, kScreenH, 290, 300);
  18. }
  19. - (void)setLiveInfo:(CurrentLiveInfo *)liveInfo{
  20. _liveInfo = liveInfo;
  21. NSArray *rtmpArray = [liveInfo.push_rtmp componentsSeparatedByString:@"/"];
  22. NSString *content = rtmpArray.lastObject;
  23. NSString *rtmp = [liveInfo.push_rtmp substringWithRange:NSMakeRange(0, liveInfo.push_rtmp.length - content.length)];
  24. self.rtmpLabel.text = rtmp;
  25. self.contentLabel.text = content;
  26. }
  27. - (IBAction)copyRtmpBtnAction:(UIButton *)sender {
  28. [UIPasteboard generalPasteboard].string = self.rtmpLabel.text;
  29. [[BGHUDHelper sharedInstance] tipMessage:ASLocalizedString(@"复制成功")];
  30. }
  31. - (IBAction)copyContentBtnAction:(UIButton *)sender {
  32. [UIPasteboard generalPasteboard].string = self.contentLabel.text;
  33. [[BGHUDHelper sharedInstance] tipMessage:ASLocalizedString(@"复制成功")];
  34. }
  35. - (IBAction)closeBtnAction:(UIButton *)sender {
  36. [self hide];
  37. }
  38. @end