FinishLiveView.m 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // FinishLiveView.m
  3. // BuguLive
  4. //
  5. // Created by xfg on 2017/8/28.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "FinishLiveView.h"
  9. @implementation FinishLiveView
  10. - (id)init
  11. {
  12. self = [[[NSBundle mainBundle] loadNibNamed:@"FinishLiveView" owner:self options:nil] lastObject];
  13. if(self)
  14. {
  15. self.frame = CGRectMake(0, 0, kScreenW, kScreenH);
  16. self.backgroundColor = kClearColor;
  17. self.bgView.backgroundColor = kGrayTransparentColor1;
  18. // 毛玻璃效果
  19. UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
  20. UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:effect];
  21. effectView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
  22. [self.bgView sendSubviewToBack:effectView];
  23. // bringSubviewToFront:effectView];
  24. // insertSubview:effectView atIndex:0];
  25. [self.bgView addSubview:effectView];
  26. self.userHeadImgView.layer.borderWidth = 1;
  27. self.userHeadImgView.layer.borderColor = kWhiteColor.CGColor;
  28. self.userHeadImgView.layer.cornerRadius = CGRectGetHeight(self.userHeadImgView.frame)/2;
  29. self.userHeadImgView.clipsToBounds = YES;
  30. // self.shareFollowBtn.layer.borderWidth = 1;
  31. // self.shareFollowBtn.layer.borderColor = kWhiteColor.CGColor;
  32. [self.shareFollowBtn setBackgroundImage:[UIImage imageNamed:@"ic_live_shareFollowBtn"] forState:UIControlStateNormal];
  33. // self.shareFollowBtn.layer.cornerRadius = CGRectGetHeight(self.shareFollowBtn.frame)/2;
  34. // self.backHomeBtn.layer.borderWidth = 1;
  35. // self.backHomeBtn.layer.borderColor = kWhiteColor.CGColor;
  36. // self.backHomeBtn.layer.cornerRadius = CGRectGetHeight(self.backHomeBtn.frame)/2;
  37. [self.backHomeBtn setBackgroundImage:[UIImage imageNamed:@"ic_live_backHome"] forState:UIControlStateNormal];
  38. [self.backHomeBtn setTitleColor:[UIColor colorWithHexString:@"#CC45FF"] forState:UIControlStateNormal];
  39. self.ticketNameLabel.text = [NSString stringWithFormat:ASLocalizedString(@"获得%@"),self.BuguLive.appModel.ticket_name];
  40. [self.delLiveBtn setTitleColor:kWhiteColor forState:UIControlStateNormal];
  41. self.delLiveBtn.hidden = YES;
  42. }
  43. return self;
  44. }
  45. - (void)layoutSubviews
  46. {
  47. [super layoutSubviews];
  48. self.userHeadImgView.layer.cornerRadius = CGRectGetWidth(self.userHeadImgView.frame)/2;
  49. }
  50. - (IBAction)shareFollowAction:(id)sender
  51. {
  52. if (_shareFollowBlock)
  53. {
  54. _shareFollowBlock();
  55. }
  56. }
  57. - (IBAction)backHomeAction:(id)sender
  58. {
  59. if (_backHomeBlock)
  60. {
  61. _backHomeBlock();
  62. }
  63. }
  64. - (IBAction)delLiveAction:(id)sender
  65. {
  66. if (_delLiveBlock)
  67. {
  68. _delLiveBlock();
  69. }
  70. }
  71. @end