| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // BGOtherPushPopView.m
- // BuguLive
- //
- // Created by Mac on 2021/8/13.
- // Copyright © 2021 xfg. All rights reserved.
- //
- #import "BGOtherPushPopView.h"
- #import "CurrentLiveInfo.h"
- @interface BGOtherPushPopView ()
- @property (weak, nonatomic) IBOutlet UILabel *rtmpLabel;
- @property (weak, nonatomic) IBOutlet UILabel *contentLabel;
- @end
- @implementation BGOtherPushPopView
- - (void)awakeFromNib{
- [super awakeFromNib];
- self.frame = CGRectMake((kScreenW - 290 ) / 2, kScreenH, 290, 300);
- }
- - (void)setLiveInfo:(CurrentLiveInfo *)liveInfo{
- _liveInfo = liveInfo;
- NSArray *rtmpArray = [liveInfo.push_rtmp componentsSeparatedByString:@"/"];
- NSString *content = rtmpArray.lastObject;
- NSString *rtmp = [liveInfo.push_rtmp substringWithRange:NSMakeRange(0, liveInfo.push_rtmp.length - content.length)];
- self.rtmpLabel.text = rtmp;
- self.contentLabel.text = content;
- }
- - (IBAction)copyRtmpBtnAction:(UIButton *)sender {
- [UIPasteboard generalPasteboard].string = self.rtmpLabel.text;
- [[BGHUDHelper sharedInstance] tipMessage:ASLocalizedString(@"复制成功")];
- }
- - (IBAction)copyContentBtnAction:(UIButton *)sender {
- [UIPasteboard generalPasteboard].string = self.contentLabel.text;
- [[BGHUDHelper sharedInstance] tipMessage:ASLocalizedString(@"复制成功")];
- }
- - (IBAction)closeBtnAction:(UIButton *)sender {
- [self hide];
- }
- @end
|