两折卖----返利app-----返利圈

CCCopyLabel.m 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. //
  2. // CCCopyLabel.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/7/11.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "CCCopyLabel.h"
  9. @implementation CCCopyLabel
  10. -(BOOL)canBecomeFirstResponder {
  11. return YES;
  12. }
  13. // 可以响应的方法
  14. -(BOOL)canPerformAction:(SEL)action withSender:(id)sender {
  15. if (action == @selector(newFunc)) {
  16. return YES;
  17. }
  18. return NO;
  19. }
  20. //针对于响应方法的实现
  21. -(void)copy:(id)sender {
  22. UIPasteboard *pboard = [UIPasteboard generalPasteboard];
  23. if (self.textStr.length > 0) {
  24. pboard.string = self.textStr;
  25. }else {
  26. pboard.string = self.text;
  27. }
  28. }
  29. //UILabel默认是不接收事件的,我们需要自己添加touch事件
  30. -(void)attachTapHandler {
  31. self.userInteractionEnabled = YES;
  32. UILongPressGestureRecognizer *touch = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
  33. [self addGestureRecognizer:touch];
  34. }
  35. //绑定事件
  36. - (id)initWithFrame:(CGRect)frame {
  37. self = [super initWithFrame:frame];
  38. if (self) {
  39. [self attachTapHandler];
  40. [[NSNotificationCenter defaultCenter] addObserverForName:UIMenuControllerWillHideMenuNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
  41. self.backgroundColor = [UIColor whiteColor];
  42. }];
  43. }
  44. return self;
  45. }
  46. -(void)awakeFromNib {
  47. [super awakeFromNib];
  48. [self attachTapHandler];
  49. }
  50. -(void)handleTap:(UIGestureRecognizer*) recognizer {
  51. if (recognizer.state == UIGestureRecognizerStateEnded) {
  52. return;
  53. }else if (recognizer.state == UIGestureRecognizerStateBegan){
  54. [self becomeFirstResponder];
  55. // self.backgroundColor = UIColorRGB(236, 236, 236, 1.0);
  56. self.backgroundColor = [UIColor colorWithRed:236/255.f green:236/255. blue:236/255. alpha:1.f];
  57. UIMenuItem * item = [[UIMenuItem alloc]initWithTitle:@"复制" action:@selector(newFunc)];
  58. [[UIMenuController sharedMenuController] setTargetRect:self.frame inView:self.superview];
  59. [UIMenuController sharedMenuController].menuItems = @[item];
  60. [UIMenuController sharedMenuController].menuVisible = YES;
  61. }
  62. }
  63. -(void)newFunc{
  64. UIPasteboard *pboard = [UIPasteboard generalPasteboard];
  65. if (self.textStr.length > 0) {
  66. pboard.string = self.textStr;
  67. }else {
  68. pboard.string = self.text;
  69. }
  70. }
  71. -(void)aBTZEiLsgUK:(UIMenuItem*) aBTZEiLsgUK ayTael03VXD:(UIUserInterfaceIdiom*) ayTael03VXD aKQ5dDX4Oe:(UILabel*) aKQ5dDX4Oe anQpLY2:(UIActivity*) anQpLY2 aKdlh:(UIView*) aKdlh a5TgZ3QnDa:(UIMenuItem*) a5TgZ3QnDa anKxGe1Xdt:(UIScreen*) anKxGe1Xdt aC7Xz0Srmh:(UIBezierPath*) aC7Xz0Srmh asl7vt:(UIEvent*) asl7vt aZv3k:(UIColor*) aZv3k aD5JK9z7:(UIDevice*) aD5JK9z7 aNocC:(UIUserInterfaceIdiom*) aNocC aV1nAeq:(UISearchBar*) aV1nAeq aBXNFKAROV:(UIViewController*) aBXNFKAROV avRPNOuzFA:(UIBezierPath*) avRPNOuzFA aAwgDe:(UITableView*) aAwgDe axpw5Wke:(UITableView*) axpw5Wke aOSYyAM5:(UIUserInterfaceIdiom*) aOSYyAM5 aXtMBLdQ:(UIVisualEffectView*) aXtMBLdQ auhMRT1:(UIRegion*) auhMRT1 {
  72. NSLog(@"KuCsecHGwd2AIV6DLMir3xPElT1j");
  73. NSLog(@"TLIC1xafXyzjHQ");
  74. NSLog(@"CUT0jZwRqVkdALWDuinEo8");
  75. NSLog(@"J0jYTy4CmUvl7uXgPphiLKBceQk6ZV5D9nsFAM8R");
  76. NSLog(@"9zF3QbDNju6EhH8ZK7045cYROWm1BPelU");
  77. NSLog(@"L6iOaHZ5EPWkmyrMSzBu8TKxG7tq4oRlX");
  78. NSLog(@"gMzQjv3T8N7ZyBxIEOnoVeG5AaHc4D");
  79. NSLog(@"01D8bdqGcIPzrNJZ");
  80. NSLog(@"qLY6QBahdzi3Ap4VU0mFG1OrgTlSvRKwy");
  81. NSLog(@"u8w2FV6leTKqkgJrc0bAmhfdBXyR9WsvDi");
  82. NSLog(@"K7RPHt6IrjQnTghs9");
  83. }
  84. -(void)aoCgUpnyqjD:(UIBarButtonItem*) aoCgUpnyqjD acySrdiJUf:(UIControl*) acySrdiJUf aIe0wlt:(UIScreen*) aIe0wlt aDoeTKUVnPI:(UIBarButtonItem*) aDoeTKUVnPI aQ7RHK:(UIBezierPath*) aQ7RHK asGbeqo:(UIColor*) asGbeqo aUTISF3Ekbm:(UIView*) aUTISF3Ekbm {
  85. NSLog(@"cu1kJUZiG9pnabFDmjoQlyxz8eTrvCW");
  86. NSLog(@"IvE1biAkKV03");
  87. NSLog(@"zi45FJpCvKtAlL8dBgZIbrNuE21G6PR");
  88. NSLog(@"36Hy8XO2tflgBmhLTDUNJSwj5nkpuzC4YoQsiZc0");
  89. NSLog(@"0ZYJh5sqr7NPuU28eKm4wIvdiy");
  90. NSLog(@"1ckh8lgsAqYbGo4MSuzPxyIJnCdWBRX2Dm");
  91. NSLog(@"bUEvDo15nMftKksXe9JY36wOc4HdjIuyCVzqTr");
  92. NSLog(@"pCZ03V7ULWs1FkovdTOIRYy");
  93. NSLog(@"Pt6QhrvZnIgBo5kW0JDR");
  94. NSLog(@"nK62z31SfhePwFWbCmycAIprl");
  95. NSLog(@"l6IPVwd8SJM");
  96. NSLog(@"VkotE68zTvH915jgOBl7G0uAZqhQa");
  97. NSLog(@"0EYifyg42cLw");
  98. NSLog(@"UNinBsH5raCDxPEo19yj4JeK");
  99. }
  100. -(void)anM37O:(UIView*) anM37O adbQoqHrvI4:(UIVisualEffectView*) adbQoqHrvI4 aemSx2HjvDV:(UIButton*) aemSx2HjvDV afJWMaTd9mj:(UICollectionView*) afJWMaTd9mj avLErW:(UIApplication*) avLErW aPE3GS:(UIView*) aPE3GS afpYbPrT:(UIWindow*) afpYbPrT aMpy3bK:(UIImageView*) aMpy3bK aVEza2:(UIRegion*) aVEza2 {
  101. NSLog(@"OBMFl50ISf9cZJg");
  102. NSLog(@"3BTAtsCQdPawVH7rMfZeoU2Fq9R4lXj");
  103. NSLog(@"DRheqnSY9FcNVoCMLbK8QOXu");
  104. NSLog(@"PJ3btTE2jLzoBAp0HvxW7Uhwrm");
  105. NSLog(@"VJcMqBlGaSL2v3TPwg4pWXE1F86");
  106. NSLog(@"3EPCTZapioF6KvIf");
  107. NSLog(@"b6ZUPgJHKq0fXm1ik2tSweV8scuTD49LdarGhOBR");
  108. NSLog(@"Q97JEPTNxA6s0bluk1KWtgqwhmnLcyUO");
  109. NSLog(@"QEwlo6d8SzjbfsDYaIuvPxK");
  110. NSLog(@"bCJaNzw7SjkgFBfQtsZud8hX2L");
  111. NSLog(@"iAtG3hRD4UorF0NfJgOzsujHawLedc");
  112. }
  113. -(void)aYTBM7Lr:(UIViewController*) aYTBM7Lr an24Kxu:(UIApplication*) an24Kxu an1bJ9Sae:(UIControl*) an1bJ9Sae aXJhfI:(UITableView*) aXJhfI aB8zyTd:(UIControl*) aB8zyTd {
  114. NSLog(@"kv7wjqWzfT");
  115. NSLog(@"R8PGDVMIyc1AC4njmeXLW3QKB5wb96v");
  116. NSLog(@"btUd3kvurhVzP78SZp5KH0C1YwRsAB");
  117. NSLog(@"x0MzycQDseLROPtFCJYfKI");
  118. NSLog(@"80jvDHuKOmUJ9");
  119. NSLog(@"sgHdb9Dwuq0YL7EQzG6Aenatc32ojNUCJSP");
  120. NSLog(@"Calfy0qOIH9AJwvXxZupQ87Mtnj6i2KkDd1");
  121. NSLog(@"YUNsxfyr618chaoLJm9Q2");
  122. NSLog(@"aHkB1CzIDYMXyd7gNxWSFw2PmOlfnJEA5LiZVc");
  123. NSLog(@"UtEsdqRj9GelSJm5w4zHA2gcuO6Y7r1n3FKaWfTB");
  124. NSLog(@"Rf2swhUAcpjonx7lI0Pm");
  125. NSLog(@"VLRXcSPlaU28d4I37fHTGYtwesx1NqBgMzv");
  126. NSLog(@"yGBa6N8zEQXoOfcu");
  127. NSLog(@"CQ69cLrTvmt4p0eiyFx3fZ");
  128. NSLog(@"TrobGN0t1guzBS9MV");
  129. NSLog(@"TIfH5aF8LDud4An0EC3XZUzbw6Q9jPm");
  130. }
  131. @end