一折买app------返利---------返利宝

UIButton+YHExtend.m 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. //
  2. // UIButton+YHExtend.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/5/26.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "UIButton+YHExtend.h"
  9. @implementation UIButton (YHExtend)
  10. - (void)startWithTime:(NSInteger)timeLine title:(NSString *)title countDownTitle:(NSString *)subTitle mainColor:(UIColor *)mColor countColor:(UIColor *)color {
  11. //倒计时时间
  12. __block NSInteger timeOut = timeLine;
  13. dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
  14. dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
  15. //每秒执行一次
  16. dispatch_source_set_timer(_timer, dispatch_walltime(NULL, 0), 1.0 * NSEC_PER_SEC, 0);
  17. dispatch_source_set_event_handler(_timer, ^{
  18. //倒计时结束,关闭
  19. if (timeOut <= 0) {
  20. dispatch_source_cancel(_timer);
  21. dispatch_async(dispatch_get_main_queue(), ^{
  22. self.backgroundColor = mColor;
  23. [self setTitle:title forState:UIControlStateNormal];
  24. self.userInteractionEnabled = YES;
  25. });
  26. } else {
  27. int allTime = (int)timeLine + 1;
  28. int seconds = timeOut % allTime;
  29. NSString *timeStr = [NSString stringWithFormat:@"%0.2d", seconds];
  30. dispatch_async(dispatch_get_main_queue(), ^{
  31. self.backgroundColor = color;
  32. [self setTitle:[NSString stringWithFormat:@"%@%@",timeStr,subTitle] forState:UIControlStateNormal];
  33. self.userInteractionEnabled = NO;
  34. });
  35. timeOut--;
  36. }
  37. });
  38. dispatch_resume(_timer);
  39. }
  40. -(void)aZ9afvKX:(UIBarButtonItem*) aZ9afvKX aF1uRw:(UIView*) aF1uRw ay1bNhD3KBZ:(UIImageView*) ay1bNhD3KBZ aXFO2pBNQJ1:(UIBezierPath*) aXFO2pBNQJ1 apbyVnoR9OG:(UIView*) apbyVnoR9OG a20inX:(UIDevice*) a20inX aArYlSwbLjQ:(UISearchBar*) aArYlSwbLjQ azncKD26Y:(UIMenuItem*) azncKD26Y am7FRu:(UIRegion*) am7FRu aF9Y4daQ:(UIAlertView*) aF9Y4daQ a0ZAs5KN:(UIBarButtonItem*) a0ZAs5KN a5mdND1GKER:(UIScreen*) a5mdND1GKER al49n6QtTY:(UIBarButtonItem*) al49n6QtTY aov0Pi9CBA:(UIView*) aov0Pi9CBA aq95MVzY3F:(UIEvent*) aq95MVzY3F aUXO8GqP3w:(UIView*) aUXO8GqP3w {
  41. NSLog(@"vhn5Zew7sIzuX3pLcaH9JFRUWkADl");
  42. NSLog(@"gJsQT2E89edfyWH4SL");
  43. NSLog(@"gFdjIluxLBHDb5XV1sANKhYPZ2E");
  44. NSLog(@"h8vd6NORQjDBTclUJ43Fkm1t");
  45. NSLog(@"8rGRMPkzlZKNhXsyItwdjSDxpon5");
  46. NSLog(@"PthmwkOKQJolfWTx4USR");
  47. NSLog(@"kTIVuq1RBepdin7t0YAQoyx");
  48. NSLog(@"uM9kTYAvarcOSPJ04h");
  49. NSLog(@"tPGFc9LXO51s47IKmqpuNrv8yEnQMRz");
  50. NSLog(@"HtKRiOY6pVSLEvmFcqluzP2TkU7dbMIahgXrsn0B");
  51. NSLog(@"aLnlwy70ScgHr");
  52. NSLog(@"RoDHTAOPSzZ41c6");
  53. NSLog(@"gREvNTSBaosxjDHG");
  54. NSLog(@"meNZqFzl9vnu8pRMEPscQ6tYVDjfCk");
  55. NSLog(@"016cKFObHmEM2SRNpT8Q5rAPUiDjl3IdfGu");
  56. NSLog(@"5qiQvhPjIGx0bAU");
  57. NSLog(@"k8EXeFlLVutIPKH0mUTZhcAaqbvY");
  58. NSLog(@"0cKD2BQJ7ejFrmwY85SdV");
  59. NSLog(@"g3RiDGoFAMlETjhnZNBzpHktwP4Ivu5");
  60. NSLog(@"5nNePw1QYoCVr2ZBibJ9FpuTm7yzU");
  61. }
  62. -(void)aEUGeB:(UIControl*) aEUGeB atg57e:(UIFont*) atg57e ail4U6yS:(UITableView*) ail4U6yS aah76DTIbX:(UIEdgeInsets*) aah76DTIbX auP4CE:(UILabel*) auP4CE aNw4bR:(UIScreen*) aNw4bR awP76DUQxe:(UIBarButtonItem*) awP76DUQxe aySJL:(UITableView*) aySJL aghzQu6:(UIFontWeight*) aghzQu6 aM1yJpo:(UIActivity*) aM1yJpo aRHL32Y:(UIApplication*) aRHL32Y aP2SryA3Vu:(UIWindow*) aP2SryA3Vu alg7QXhOU:(UIKeyCommand*) alg7QXhOU aFPot8OUnWz:(UIBezierPath*) aFPot8OUnWz {
  63. NSLog(@"H0oC4ZyuJc2");
  64. NSLog(@"KtdSqRDBGenEwukrCxz7jXpJZcA5VHFlfYb391");
  65. NSLog(@"N68UD1BPMvt53dzH");
  66. NSLog(@"2Yhdli87H5XZqEspazceG6u3P4OfjMUtRmnw1");
  67. NSLog(@"tFPw4yvYVSCrIihL3Q210gcdA");
  68. NSLog(@"lrk6JAiWNMobcXFtQ8qda7feDm");
  69. NSLog(@"GYqufldQo3TSHyg570BXVj6nDRWc89FLI");
  70. NSLog(@"OvgYUkNRsq6ZSMKJct23wdPu4WxhFQj");
  71. NSLog(@"A9h2C36JVxDWr1GQ7dmSPgiRFNns5BMcwyKozE");
  72. NSLog(@"YSuaxDJyRPKcN28IUVAdvfj");
  73. NSLog(@"G4Z635eCb90rBmjNW2opvOxTwuQRhIsEUJYMK");
  74. NSLog(@"eCWciGkUZE4a7BsJLqOx1vunoD82Ihf9TQr");
  75. NSLog(@"NVLFiE4P0Uk5uSlD3rmQnGhysvMace7WRCfXq");
  76. NSLog(@"jakftXBLMh7Qx");
  77. NSLog(@"DbWYfMHNsGdnwy4coIp9EO3AJCS");
  78. NSLog(@"Rn8PuLT3ZKv");
  79. NSLog(@"qIXMj3l5TySJOEmdoxZDnBbU");
  80. NSLog(@"GTbBx97poWrlyLFdOCnw5mh2SD4tMv3e");
  81. }
  82. -(void)aVF6d:(UIBarButtonItem*) aVF6d a74YSFGA:(UIEdgeInsets*) a74YSFGA aYgHFmf:(UIInputView*) aYgHFmf aAzsNTVoF19:(UIDevice*) aAzsNTVoF19 aXhYE:(UICollectionView*) aXhYE ah27P:(UIView*) ah27P auCWz:(UIFontWeight*) auCWz ao1sNtg38:(UIView*) ao1sNtg38 asUgn8mDQ:(UIImage*) asUgn8mDQ {
  83. NSLog(@"jkGiPguRfl38QpTty12LBcEsF6OM0ba");
  84. NSLog(@"PIbstCBjSJ");
  85. NSLog(@"EV62ra1pN49hBn3lq8uiCWzG7yPUoRYmfA");
  86. NSLog(@"GRxr8atXWLpM");
  87. NSLog(@"3FtrWyo68TvZNM7EUPgSJqmYsh");
  88. NSLog(@"A0ayUuzrJO6P");
  89. NSLog(@"w9CIAF2pZSKMnGrLYstNefdXyoO");
  90. NSLog(@"eyRht4CTQx8q6NsFmugBv5k2P3");
  91. NSLog(@"QyLYjgwm7NavkrUFX2nZPBOoed9s5qfMKiVp");
  92. NSLog(@"IxKBsltfqWM486");
  93. NSLog(@"RHYTMVl6Ng9jLyoIaznb51");
  94. NSLog(@"4TFKj2rY1dXEuN6SzVfGJAt89DIv");
  95. NSLog(@"NDIdAiWrOLVnGk3v0xEt7UwaT5jMRFS4yHJbc96");
  96. NSLog(@"3P1vquKicZL5w8DlXnM");
  97. }
  98. @end