PasteView.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // PasteView.m
  3. // BuguLive
  4. //
  5. // Created by fanwe2014 on 16/6/29.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. #import "PasteView.h"
  8. @implementation PasteView
  9. - (void)awakeFromNib
  10. {
  11. [super awakeFromNib];
  12. self.backgroundColor = kClearColor;
  13. self.buttomView.layer.cornerRadius = 5;
  14. self.userInteractionEnabled = YES;
  15. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap)];
  16. [self addGestureRecognizer:tap];
  17. self.contentlabel.alpha = 0.8;
  18. self.cancelButton.titleLabel.alpha = 0.8;
  19. self.pasteButton.titleLabel.alpha = 0.8;
  20. self.deleteButton.titleLabel.textColor = kAppGrayColor1;
  21. self.lineView1.backgroundColor = myTextColorLine4;
  22. self.lineView2.backgroundColor = myTextColorLine4;
  23. }
  24. - (void)tap
  25. {
  26. if (self.delegate)
  27. {
  28. if ([self.delegate respondsToSelector:@selector(deletePasteView)])
  29. {
  30. [self.delegate deletePasteView];
  31. }
  32. }
  33. }
  34. - (IBAction)buttonClick:(UIButton *)sender
  35. {
  36. int index =(int)sender.tag;
  37. if (self.delegate)
  38. {
  39. if ([self.delegate respondsToSelector:@selector(sentPasteWithIndex:withShareIndex:)])
  40. {
  41. [self.delegate sentPasteWithIndex:index withShareIndex:self.shareIndex];
  42. }
  43. }
  44. }
  45. @end