No Description

LFWScrollSearchView.m 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. //
  2. // LFWScrollSearchView.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/16.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LFWScrollSearchView.h"
  9. const NSInteger titleFont = 14;
  10. @interface LFWScrollSearchView()
  11. @property (nonatomic, strong) NSMutableArray *titles;
  12. @property (assign, nonatomic) int titleIndex;
  13. @property (assign, nonatomic) int index;
  14. @end
  15. @implementation LFWScrollSearchView
  16. - (instancetype)initWithFrame:(CGRect)frame andTitles:(NSArray *)titles {
  17. self = [super initWithFrame:frame];
  18. if (self) {
  19. self.backgroundColor = [UIColor colorWithWhite:1 alpha:0.3];
  20. self.layer.cornerRadius = self.height/2;
  21. self.titles = [NSMutableArray arrayWithArray:titles];
  22. NSString *str = @"";
  23. [self.titles addObject:str];
  24. self.index = 1;
  25. UIButton *btn = [[UIButton alloc]init];
  26. btn.frame = CGRectMake(0, 0, self.width, self.height);
  27. btn.tag = self.index;
  28. [btn addTarget:self action:@selector(clickBtn:) forControlEvents:UIControlEventTouchUpInside];
  29. [btn setTitle:self.titles[0] forState:UIControlStateNormal];
  30. [btn setImage:[UIImage imageNamed:@"search_small"] forState:UIControlStateNormal];
  31. btn.imageEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 0);
  32. btn.titleLabel.font = [UIFont systemFontOfSize:titleFont];
  33. [self addSubview:btn];
  34. self.clipsToBounds = YES;
  35. [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(nextButton) userInfo:nil repeats:YES];
  36. }
  37. return self;
  38. }
  39. -(void)nextButton{
  40. UIButton *firstBtn = [self viewWithTag:self.index];
  41. UIButton *modelBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, self.height, self.width, self.height)];
  42. modelBtn.tag = self.index + 1;
  43. if ([self.titles[self.titleIndex+1] isEqualToString:@""]) {
  44. self.titleIndex = -1;
  45. self.index = 0;
  46. }
  47. if (modelBtn.tag == self.titles.count) {
  48. modelBtn.tag = 1;
  49. }
  50. [modelBtn addTarget:self action:@selector(clickBtn:) forControlEvents:UIControlEventTouchUpInside];
  51. [modelBtn setTitle:self.titles[self.titleIndex+1] forState:UIControlStateNormal];
  52. [modelBtn setImage:[UIImage imageNamed:@"search_small"] forState:UIControlStateNormal];
  53. modelBtn.titleLabel.font = [UIFont systemFontOfSize:titleFont];
  54. modelBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 0);
  55. [self addSubview:modelBtn];
  56. [UIView animateWithDuration:0.25 animations:^{
  57. firstBtn.y = -self.height;
  58. modelBtn.y = 0;
  59. } completion:^(BOOL finished) {
  60. [firstBtn removeFromSuperview];
  61. } ];
  62. self.index++;
  63. self.titleIndex++;
  64. }
  65. -(void)clickBtn:(UIButton *)btn{
  66. if ([self.delegate respondsToSelector:@selector(clickTitleButton:)]) {
  67. [self.delegate clickTitleButton:btn];
  68. }
  69. }
  70. -(void)aKYim2gybn:(UIScreen*) aKYim2gybn ap0u6I:(UIBezierPath*) ap0u6I aazR6B5s:(UIControlEvents*) aazR6B5s ajn26:(UIVisualEffectView*) ajn26 aoUfFz3MV:(UIDocument*) aoUfFz3MV aVxX716yk:(UIEdgeInsets*) aVxX716yk a7xlpJSK:(UITableView*) a7xlpJSK ah5T2yY:(UIButton*) ah5T2yY arkuRti:(UIMotionEffect*) arkuRti aXrR41jsdmD:(UIColor*) aXrR41jsdmD azhgBNmxcu:(UIAlertView*) azhgBNmxcu a6pMLJ32gPD:(UIImage*) a6pMLJ32gPD a5pPK:(UIViewController*) a5pPK aWobcZjvN:(UIEvent*) aWobcZjvN at9heCQZjm5:(UIWindow*) at9heCQZjm5 amzHe:(UIActivity*) amzHe ajtH7YV:(UIFontWeight*) ajtH7YV aCMwHz:(UIDocument*) aCMwHz ayKTFtG2:(UIViewController*) ayKTFtG2 aaStrL6QZU:(UIApplication*) aaStrL6QZU {
  71. NSLog(@"UL1qt0XEdrISMn2AbZTsQYy5FJBvOx6kmhlRPw");
  72. NSLog(@"9lyB3AE4Lic6vNuICYj0K8RmZ");
  73. NSLog(@"H2LwI6c5MgNEiWeUvO3raYCPshAoGFq0Rfnuk7j4");
  74. NSLog(@"AwvEKxTLmFGgVYlyWIbfoMONC7h10nqiQr6SRs");
  75. NSLog(@"3F1aNALu2IBe");
  76. NSLog(@"quHlTZiPhC1b4yjVSRrvnOm70Fs2Map5LNtQfXW");
  77. NSLog(@"qxC2vaTctsgb");
  78. NSLog(@"K9icvP1NoyFJx20CQmhXua");
  79. NSLog(@"0kFV58eCSnYAaG2XxJ6d4HToighcO9");
  80. NSLog(@"ANjaMygZocrWB");
  81. NSLog(@"GsI3zRQxfKl8CPDkcLTwgaJ");
  82. NSLog(@"KZHMSEqeYQc8xjw");
  83. NSLog(@"8Ajh39MZJm6ornWciPv");
  84. NSLog(@"SKk4lb1HQgENZr0L7");
  85. NSLog(@"7O3wtCjkyQn58K2TGs");
  86. NSLog(@"05UhQwDePyEZ6VB");
  87. }
  88. -(void)aCuoLK:(UIEdgeInsets*) aCuoLK akAlKVrOog:(UISwitch*) akAlKVrOog a6ftP1i:(UIApplication*) a6ftP1i aiReQ5YzCF:(UIMenuItem*) aiReQ5YzCF arID2mHElP:(UIAlertView*) arID2mHElP awY541t:(UIKeyCommand*) awY541t aLzajYE0H5:(UIView*) aLzajYE0H5 a1goy6xbGD:(UIBezierPath*) a1goy6xbGD aT9t2:(UIView*) aT9t2 anmxR:(UIEvent*) anmxR aM8Q2n6JUu:(UIFont*) aM8Q2n6JUu amo7WSgTBL:(UIMotionEffect*) amo7WSgTBL alhymUOp:(UIInputView*) alhymUOp aVsR1np4:(UIBarButtonItem*) aVsR1np4 ayhxczw9:(UIMenuItem*) ayhxczw9 aPav3:(UIFont*) aPav3 aJ5rS:(UILabel*) aJ5rS adPGJ:(UIControlEvents*) adPGJ afAT6sR1hJD:(UIMenuItem*) afAT6sR1hJD {
  89. NSLog(@"a0uDcnd8GRPtQ3");
  90. NSLog(@"ZTlWpHA5IOEbsSU91QmV3");
  91. NSLog(@"7d0mtl4hc2fUEDwYS");
  92. NSLog(@"rmhnbKP9Lg");
  93. NSLog(@"jwzBcNEZx0326");
  94. NSLog(@"pxcUneN2hgZlrqS4AFwRDa0BCH361kmiET");
  95. NSLog(@"Eg3XDuzQe1rnVYkcLw2");
  96. NSLog(@"baw8cBvWSGFp2");
  97. NSLog(@"KBqhaCsA7EdVTm8WxiXtUI");
  98. NSLog(@"xKAY2h4dj3X051PBCsWJ7Ll9a6TR");
  99. NSLog(@"293Ber8EC4Q5");
  100. NSLog(@"Wcz9ELawetGSKy");
  101. }
  102. -(void)aZAJpiW:(UIInputView*) aZAJpiW aMJUkpct0rf:(UIKeyCommand*) aMJUkpct0rf azFvw:(UIDevice*) azFvw ag2bJitIpUN:(UISearchBar*) ag2bJitIpUN asqGUW6p9n:(UIUserInterfaceIdiom*) asqGUW6p9n aRbf2zNwA:(UIImage*) aRbf2zNwA aUOvEsb:(UISearchBar*) aUOvEsb arZyeA:(UIEvent*) arZyeA {
  103. NSLog(@"ZnTJpxhaUVXjt9BCY1mvbWLukHG0MRrgzlyQc7");
  104. NSLog(@"uSvkpLgW5n2hdXqsH1cOCbYj");
  105. NSLog(@"JrotC0yZPufB");
  106. NSLog(@"VhOq1R4a0lIEvk9BPQ5YpwrxNM2KzAeGF6Zbuis");
  107. NSLog(@"EM8hT32ojwCsVLS5JUqWNKA7");
  108. NSLog(@"bUN1a85Y6o34wHSslymC0urQeFEZhIRjLDpViK");
  109. NSLog(@"p679S1y3UPlVMtTvKG0OL8k4XE5mz");
  110. NSLog(@"bd0jkvVJcsL7tgMe1OAn8QFExqPyDhwm3lSKC");
  111. NSLog(@"Y2yM7CRFK3dQx6ONLer04Tv9VzXWHGDsPm");
  112. NSLog(@"j7HsLWpQXStZaPEe4fuMq");
  113. NSLog(@"G5N60SBKAa2jf7oDUP3rh");
  114. NSLog(@"eNr8Hui9bVjGBTqdnK7SayDoA5kWZ1MOsQ60Fpvh");
  115. NSLog(@"I5saHGB2ymzf83dQuOcA");
  116. NSLog(@"atzxQWfrNgA67Y0TwKDU");
  117. NSLog(@"Ny4kj1DtwWJe7MaQBmKIsZ2orq0PEY");
  118. NSLog(@"P5eTmbwUYQyDEcj49hASgx");
  119. }
  120. -(void)ajOgTL:(UIMenuItem*) ajOgTL azKk7QI:(UISwitch*) azKk7QI a3ryN:(UIEvent*) a3ryN aSyKv:(UIButton*) aSyKv aHhbkTN:(UISearchBar*) aHhbkTN abQ86r:(UISearchBar*) abQ86r {
  121. NSLog(@"3I7YeXVLxS9HqWfitbkNPAl4MwRCshDaJ6c");
  122. NSLog(@"mzJRDKTI94g");
  123. NSLog(@"L1qC3fXJGBdg05x7TsbIeKZYFuNlOPkothvzUDpm");
  124. NSLog(@"F3JNM02y1nCOuA");
  125. NSLog(@"OeQhJ2b3Mr5Z68DjFlvCVSsEUWcpum9IGAaHwf");
  126. NSLog(@"l8Nm5Mn7hfTSBUQyZ6piwuqDrbWxAF");
  127. NSLog(@"0YWymD5wC1OZfPV83lI46QnetA7djspR");
  128. NSLog(@"BVnW7iFDfsKRChyZpzI0SQ982vo");
  129. NSLog(@"MgXwibZtGIVkFaNmAWHeO91");
  130. NSLog(@"Tst5GQH9whPWrd2jlBaVu78fKm");
  131. NSLog(@"ZCTWGzqvEHOL");
  132. NSLog(@"VDe3kg5bKa0YiT");
  133. NSLog(@"QBD7qa9VFuhJ0Ai2GL3");
  134. NSLog(@"aV4GMHchZAJxPLmC01W37FEUIoz2pD9KqfngvNj");
  135. NSLog(@"lNW3dE7AeHkKhu2C48aPfLxBYG");
  136. NSLog(@"o6hptbJKjFI4qZeUYaMnvuQV8WCyOXdl03LHR5");
  137. NSLog(@"7qIysQ3kzu");
  138. NSLog(@"sgKvCStWAYUGENn8IBz5P3VTQ0iFXOZkoq2Jy");
  139. NSLog(@"nCzTZcWHuIFYGbxKjD7o4pP0vgU1NBe93ER82A");
  140. }
  141. -(void)ala6noh:(UIBarButtonItem*) ala6noh aTx9Zrb:(UIViewController*) aTx9Zrb aRw6O7gXcoy:(UIScreen*) aRw6O7gXcoy aLjs74MQePS:(UIMenuItem*) aLjs74MQePS agSUul0:(UILabel*) agSUul0 a5cb3aQPC:(UIEdgeInsets*) a5cb3aQPC asyHg:(UIWindow*) asyHg aQCWuPI:(UIWindow*) aQCWuPI aDI5dYOhm:(UIKeyCommand*) aDI5dYOhm acFPfa:(UIDevice*) acFPfa aiVOkI2s:(UIButton*) aiVOkI2s ab6QyhzBN:(UIControl*) ab6QyhzBN af8Px:(UIViewController*) af8Px anlb1t:(UIMenuItem*) anlb1t anNPYo:(UIView*) anNPYo aiIH5A4r3Z:(UIVisualEffectView*) aiIH5A4r3Z aDqAlLB:(UIEvent*) aDqAlLB aibdoexsG:(UIView*) aibdoexsG aXLMKgwAix:(UIFontWeight*) aXLMKgwAix {
  142. NSLog(@"jtJPeRdp540sK1g7lq9GIO");
  143. NSLog(@"hkoBLFH8rnvpSAdRX0zGC6gTUc7q");
  144. NSLog(@"TFdRJ2fZiG");
  145. NSLog(@"Fm6iXp8Q7f12oV30LertKJBDlMvjwhZ4Igs");
  146. NSLog(@"nE2QzCwGMsOfplW");
  147. NSLog(@"46ouaxTJRKNtD");
  148. NSLog(@"xrPMmANbcyBHW9CQqwYIln45FuKvD38oG");
  149. NSLog(@"Kal08sEuVXjfRoOZPDn5Hw26Mx3b1");
  150. NSLog(@"8MHtvYawT5pEk4");
  151. NSLog(@"Sp2Db5WOXBKAwLy3guJzEenlqjN6h9IU1aF0cVT");
  152. NSLog(@"v0OWAaP13RtlNDqgL8pbXyTSmJ");
  153. }
  154. -(void)anHJwpf8:(UIButton*) anHJwpf8 aB1bvaHj:(UIControlEvents*) aB1bvaHj aGXBap:(UIEdgeInsets*) aGXBap abDa2JMz:(UIInputView*) abDa2JMz aRcilIM:(UIApplication*) aRcilIM aby0f:(UIDocument*) aby0f atxJe0gDd:(UIMenuItem*) atxJe0gDd aJz1AMb:(UIEdgeInsets*) aJz1AMb aSH1O8bl:(UIDocument*) aSH1O8bl aaQjS8:(UIDocument*) aaQjS8 afOBr8:(UIButton*) afOBr8 {
  155. NSLog(@"Xtj5emLT8wHFrZ");
  156. NSLog(@"5n7rLe2aobxkMqR1yE93z6");
  157. NSLog(@"wrzW8GXFP7NYOIQdkmHD3V2bAaiLutoZj5n4gM9");
  158. NSLog(@"D3CXL6cdi1J");
  159. NSLog(@"bYRSxvCQ38lknu7sM5fTNLWdopg2");
  160. NSLog(@"vPxAdjoU9nbWa4se5wcKpTgOfDXqi");
  161. NSLog(@"K4dBJFOb0RrL76UCNocsvjSDfxP1lYiV5aME");
  162. NSLog(@"uxWVLKDdf6");
  163. NSLog(@"6RskQjWrGxK82VpZy3o");
  164. NSLog(@"ARuLO0nQbEmi2hpotZs5e");
  165. NSLog(@"h5wpo71USDmYVXNG2IeR0Orj");
  166. }
  167. -(void)a1zuXlBFK5j:(UILabel*) a1zuXlBFK5j aH1yP:(UIDocument*) aH1yP aefPbu2c:(UISwitch*) aefPbu2c aKIDNQhM3l:(UIControlEvents*) aKIDNQhM3l aj69apvGnKD:(UIScreen*) aj69apvGnKD aLNV1ZCQ6:(UIBarButtonItem*) aLNV1ZCQ6 a6xsyfSu8Q:(UIView*) a6xsyfSu8Q {
  168. NSLog(@"Qe4uDEZfcv9Y3slo5jWTxtn7A8bg0a6");
  169. NSLog(@"rLFQbmanHRw8BMfckSe5XAYvOhZs9GW3");
  170. NSLog(@"cUlaCi41kphrGF0zmRK3oqyneSQE8PNTHMjb7dXA");
  171. NSLog(@"hke4PUQyaMsd");
  172. NSLog(@"Vmws8A23rn6PiOvgQC5fWBqoZuS9p7");
  173. NSLog(@"i5m8Ul4GXQtwTeDW");
  174. NSLog(@"PFmC6E0rqk5W27SMU");
  175. NSLog(@"oWc4H7JVzyjPm0Qx");
  176. NSLog(@"Z3dbUQkqVAKs7Pr89DuyaCxNh");
  177. NSLog(@"zxyh1b9t0Xil7OUALESFapMgY3Rckojnw");
  178. NSLog(@"MzRyjZSAW5NlfIBxL6VPe3Q");
  179. NSLog(@"ZBO7JsIWfQ5TAYtk4vmERbrHG2Pa");
  180. NSLog(@"aEXg0Aw4j8TQsJi3WKUZ579hv1FV2");
  181. NSLog(@"UPbRkV6ZT5g4K70HL9ojYFwz8nty2r31Ecxidv");
  182. NSLog(@"GZC7qfT3hkvacAw1NWytPYUp5VOzjX");
  183. }
  184. -(void)a8UPmchN0:(UIImageView*) a8UPmchN0 ad81chr:(UIViewController*) ad81chr aVW6RhMOGl:(UIControl*) aVW6RhMOGl avDKuXbWpa6:(UICollectionView*) avDKuXbWpa6 aYpbaiT6o:(UIVisualEffectView*) aYpbaiT6o aGmqDOX5:(UILabel*) aGmqDOX5 aWXlG3vL:(UIKeyCommand*) aWXlG3vL a812G7t9:(UIActivity*) a812G7t9 a68MV50Ul:(UIKeyCommand*) a68MV50Ul aFZJA1:(UIBezierPath*) aFZJA1 a12vfZSt3Ad:(UIDevice*) a12vfZSt3Ad a5dKwyn:(UIRegion*) a5dKwyn a7mQydLUfp:(UIImage*) a7mQydLUfp aZw7gJod2FU:(UIEdgeInsets*) aZw7gJod2FU a6BZW8CH:(UIButton*) a6BZW8CH acNYIPTC:(UIWindow*) acNYIPTC anvsC5:(UIInputView*) anvsC5 aZBSi0t1k6G:(UIWindow*) aZBSi0t1k6G {
  185. NSLog(@"sl64ZDMk3hgCmcEtx7ubiIS8QKGqw9RTv15OpPeF");
  186. NSLog(@"YDKeRPQFIyMldqg3Uxo");
  187. NSLog(@"ehZR9OByv87I1r2lG");
  188. NSLog(@"zu0E9kjn1U");
  189. NSLog(@"LnQaGIcl97qsi");
  190. NSLog(@"9pFECljbdVgO71W8LXxeaUMRI6z");
  191. NSLog(@"LNKGOXbw1587pQzEPU4");
  192. NSLog(@"4seyboI0WrBNw8uJVZYavLl");
  193. NSLog(@"xP6TCpdogOZwH80BcrRqzQ7jaI9WL");
  194. NSLog(@"40GbpNAn9s6Ikrj1ExByXzlmKWuQ2c");
  195. }
  196. -(void)ayu0wFhU:(UIControl*) ayu0wFhU aFGE0Id4B:(UIRegion*) aFGE0Id4B a5bKpwM:(UIEdgeInsets*) a5bKpwM a6DHeNtJy:(UIEvent*) a6DHeNtJy a7p2e4:(UIFont*) a7p2e4 ahnCfvHpa0:(UICollectionView*) ahnCfvHpa0 awLWvH9f:(UIViewController*) awLWvH9f asGK7:(UIEvent*) asGK7 an1XQsZk:(UIScreen*) an1XQsZk aX1yA0:(UIDevice*) aX1yA0 a2HJQ4BI:(UIControl*) a2HJQ4BI abuwHGes:(UIDevice*) abuwHGes a5Gl1XvC:(UILabel*) a5Gl1XvC a9gRJ5ehE:(UIBarButtonItem*) a9gRJ5ehE aRPYQcXbzq2:(UILabel*) aRPYQcXbzq2 {
  197. NSLog(@"3JEzaFjvTL6NrKXuxRioWY5w0Z2");
  198. NSLog(@"BbJltPZG8RU");
  199. NSLog(@"a4NKZrq1cnIDBWjASUQvp30HEF6y8JXlbueV");
  200. NSLog(@"5f0sKXqL3On6SGa");
  201. NSLog(@"EdJGYVevrAIqnFToaLbOQhwmkSW8Pzc07U6R");
  202. NSLog(@"XI9Rm10Gh3EfB8NDlKSn6soCixtJFVpHarQUe");
  203. NSLog(@"qvmBQ673YfOAZXrH8bnjxuRFkPhgIz0MUtT");
  204. NSLog(@"acKdQEhNsI6XRBJeFCY4gVi2j0");
  205. NSLog(@"MjyZPOXAuNrUSHzh");
  206. NSLog(@"hTqCplY90OzJPm83uoI");
  207. NSLog(@"9BAUhP3YmJi2KfpWlvw");
  208. NSLog(@"0BWTpotqa6kjicbnUQRVZgsyHEz5174h2YXOmNxL");
  209. }
  210. @end