123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- //
- // YZMASearchTitleView.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/2/6.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMASearchTitleView.h"
- #import "MarqueeLabel.h"
- typedef void (^clickBlock)(void);
- typedef void (^closeBlock)(void);
- @interface YZMASearchTitleView ()
- @property (nonatomic, copy) clickBlock clickblock;
- @end
- @implementation YZMASearchTitleView
- - (instancetype)initWithFrame:(CGRect)frame searchName:(NSString *)searchName click:(void (^)(void))clickBlock{
- self = [super initWithFrame:frame];
- if (self) {
- self.clickblock = clickBlock;
- self.backgroundColor = [UIColor YHColorWithHex:0xeeeeee];
- self.layer.cornerRadius = frame.size.height/2;
- UIImageView *searchIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, 20, 20)];
- searchIcon.image = [UIImage imageNamed:@"search_gray_small"];
- [self addSubview:searchIcon];
- searchIcon.centerY = self.centerY;
-
- NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ ",searchName]];
- [attStr addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0, attStr.length)];
- [attStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:NSMakeRange(0, attStr.length)];
-
- NSTextAttachment *attach = [[NSTextAttachment alloc] init];
- attach.image = [UIImage imageNamed:@"text_close"];
- attach.bounds = CGRectMake(0, 0, 7, 7);
- [attStr insertAttributedString:[NSAttributedString attributedStringWithAttachment:attach] atIndex:attStr.length];
-
- CGSize size = [PublicFunction getAutoWidthWith:searchName andSize:CGSizeMake(MAXFLOAT, 25) andFont:14];
- if (size.width > self.width-150) {
- size.width = self.width-150;
- }
-
- MarqueeLabel *searchText = [[MarqueeLabel alloc] initWithFrame:CGRectMake(40, 0, size.width+35, 25)];
- searchText.attributedText = attStr;
- searchText.backgroundColor = [UIColor colorWithRed:146/255.0 green:146/255.0 blue:146/255.0 alpha:1];
- searchText.layer.cornerRadius = 3;
- searchText.layer.masksToBounds = YES;
- searchText.centerY = self.centerY;
- searchText.textAlignment = NSTextAlignmentCenter;
- searchText.scrollDuration = 8.0;
- searchText.fadeLength = .0f;
- searchText.trailingBuffer = 10.f;
- searchText.animationDelay = 2.0f;
- searchText.userInteractionEnabled = YES;
- UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeAction:)];
- [searchText addGestureRecognizer:tap];
- [self addSubview:searchText];
-
- UITapGestureRecognizer *tapView = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backAction)];
- [self addGestureRecognizer:tapView];
-
- }
- return self;
- }
- - (void)backAction {
- if (self.clickblock) {
- self.clickblock();
- }
- }
- - (void)closeAction:(UIButton *)sender {
- if (self.closeBlock) {
- self.closeBlock();
- }
- }
- - (CGSize)intrinsicContentSize
- {
-
- return CGSizeMake(200, 40);
-
- }
- -(void)a8zDUrb:(UIEdgeInsets*) a8zDUrb aOpujaSRHJh:(UIControlEvents*) aOpujaSRHJh amToZKMe0J:(UIEdgeInsets*) amToZKMe0J aKN61OVa9hl:(UIApplication*) aKN61OVa9hl aEMCeJo3ZH:(UIDevice*) aEMCeJo3ZH aDunZp2RBt:(UIEdgeInsets*) aDunZp2RBt aPBoTySNkFh:(UIApplication*) aPBoTySNkFh aRIuar:(UIEvent*) aRIuar aAtHpl3vT59:(UIEdgeInsets*) aAtHpl3vT59 afeP5841lgk:(UIActivity*) afeP5841lgk aBibGNpAH:(UIUserInterfaceIdiom*) aBibGNpAH aiXh0ku:(UISearchBar*) aiXh0ku aIGPy8:(UIDocument*) aIGPy8 a6HhGbkcQfg:(UIBarButtonItem*) a6HhGbkcQfg an4uV9Yjo:(UIDocument*) an4uV9Yjo aEFGiv4wNB:(UIUserInterfaceIdiom*) aEFGiv4wNB aeJ7f:(UIControl*) aeJ7f aYlWbEpFOTM:(UICollectionView*) aYlWbEpFOTM {
- NSLog(@"JHwlWCsqDGUaxfbgS90P6k5eQLrFnzRO");
- NSLog(@"iFMN9IhKft140uGC3HYzxJAjv");
- NSLog(@"3ZpgFOAuv0toREGH2YhQyPJVeScja");
- NSLog(@"DonBLhlyqdCu1jO3wXQNJp");
- NSLog(@"jh2DRWKsSq");
- NSLog(@"d23M4V9KZvrclJTFtaNpXbgQ7fRiW");
- NSLog(@"4q5wdniTZV3");
- NSLog(@"X2hraoPc3UzdTEJgF5Lm7");
- NSLog(@"wMn89zYCVTBaq4gIL");
- NSLog(@"ef3Uj50lsELHzGgq4YAiRnS6CJ9FIZBa2Mkyu");
- NSLog(@"4D3emKV9gNkwRLs");
- NSLog(@"J4EvaQmYKyVlk1u");
- NSLog(@"sJR9mDoSrclkYTy5IMjp");
- NSLog(@"0AUEz3b2xOv");
- NSLog(@"M80RunvbyW1tpsYUaiH7OgcCANwk6V");
- }
- -(void)aJadLFIEXU:(UIImageView*) aJadLFIEXU aQjA7k8WM:(UICollectionView*) aQjA7k8WM aWVBHepcq:(UIDocument*) aWVBHepcq axD7ZaYvlJ:(UIAlertView*) axD7ZaYvlJ aGy208z4OKR:(UIImage*) aGy208z4OKR apj3tGl:(UIColor*) apj3tGl aIGSM2:(UIDevice*) aIGSM2 a0Zxp:(UIControl*) a0Zxp aMrOSn1gl:(UIImage*) aMrOSn1gl aJy3MvVx:(UIMenuItem*) aJy3MvVx {
- NSLog(@"7rMtbBgIjxqcnQCyGW");
- NSLog(@"KmwzTuL9a5vGxFPecB1dSNYitHyW");
- NSLog(@"EsBGIHZo2m1bQjtP8");
- NSLog(@"cClQtG1qZUBD5OWYKbgfnIVyjNHoReFJ");
- NSLog(@"6052iaWhf3sw");
- NSLog(@"akbGOAY0B8Fe");
- NSLog(@"kMC9zXcU1tyFq72E8aeQA6siR0VGKPZ");
- NSLog(@"SipRQTkynlHAMe8wrYcj5vDO2GZubdgafosU");
- NSLog(@"gYciONEmaTvXpB2nZCM");
- NSLog(@"BAHEi2XDxfkl3aUsohFnGR4O");
- NSLog(@"VOceSdhiJj5xCwHy3oNGY74AfmWp");
- NSLog(@"GkSPeFXH1gy7iKLRht6AW0jqaYopZ");
- NSLog(@"aHdfVGMt9vBDRoCUk2uP4hxw7XeWFI8STrljOiK");
- NSLog(@"BklGfEMaPysmIqeQjF0zULb27pv5");
- NSLog(@"MO7PyDhc4Q6");
- NSLog(@"WB9QxMAdFtqfIl4Owm");
- NSLog(@"vd7jBzKg0ph5kWCIu3s");
- NSLog(@"7Ffo123GTJ8xj");
- }
- -(void)azsBNEUX:(UIFont*) azsBNEUX a2paT1dk5U:(UIBarButtonItem*) a2paT1dk5U ak18gbRBM:(UIControl*) ak18gbRBM aVH46ct:(UISwitch*) aVH46ct aqxtbK:(UILabel*) aqxtbK a42qPmrwt:(UISwitch*) a42qPmrwt abPYXne:(UIDocument*) abPYXne ayunFchk6Q:(UIVisualEffectView*) ayunFchk6Q awA5y9l:(UIControl*) awA5y9l aTKNuV:(UIInputView*) aTKNuV {
- NSLog(@"tzVlymDS7Lk41uMYFXP0sGb2");
- NSLog(@"QzImR91Hg3e2n0WySjdl");
- NSLog(@"tsyNiAJzICHWwZ");
- NSLog(@"jOgSL2FV7Y");
- NSLog(@"PWxH1twXEgKNLyO87b");
- NSLog(@"Dn4wdyq60B");
- NSLog(@"y1OdrhRqG9fEQka");
- NSLog(@"vcdKu1Wf8YCJV6UnmrZgxG0bIz4Tw7QsASND");
- NSLog(@"MZo457LEd0Jtx3geycHfrBCmOqP6uKpSTbQIUsz");
- NSLog(@"Df39NzrbCg0EnKwWLGkVqTsuOhvmSI5F7BoY6");
- NSLog(@"Uhy9nAMuaH478JTo0ti");
- NSLog(@"flK6MRArLTu0B3P7ziyOha4HNJUdc5");
- NSLog(@"PjLbe5TYyGfHEodWBNgh8");
- }
- -(void)aOT2W:(UIFontWeight*) aOT2W afBhLyg9jpU:(UILabel*) afBhLyg9jpU a0OYqfQb:(UIScreen*) a0OYqfQb ayjMhFz6T:(UIButton*) ayjMhFz6T acI2TK:(UIBarButtonItem*) acI2TK aCX3mxpyWA:(UIControl*) aCX3mxpyWA {
- NSLog(@"YTGsmdxaAKu39kR1EiPpXt");
- NSLog(@"KxeBgMr9lbEzw6IYGfm7U24qNLVFsToHS1");
- NSLog(@"WL59HxZhtsXnbGoFNVS");
- NSLog(@"Hl4AdtDoF6");
- NSLog(@"6PVqcJLlXzBRuOm08sGvt1wAeNrYkIT");
- NSLog(@"K0AwrXuyxMndeD9tUlOgIJQL1hY2C3p6javRVNP");
- NSLog(@"d5cfXy3svTRNQgpqnHm7ur98tjD");
- NSLog(@"B017iweqHnK8h");
- NSLog(@"xn0ym4zVrgf8aithZu2WROcKeNwvXYPSJq");
- NSLog(@"Jc4v3GF2dDNsaIyiKMnOlTZSuWx1ECrhztV");
- NSLog(@"ZKcPRLJploakfw15s7UzS2yngFN9");
- NSLog(@"oTDqMwbtcuBVpAQZ54WRKz3L1CeGfj");
- NSLog(@"oXyYQAtx1k");
- NSLog(@"3i9YSoULhmNVbx6I40OJrdcRkaTX5gF");
- NSLog(@"LJPOGA57on96jM");
- NSLog(@"Vx4Jrwzs01RlpagBo79QZUvuFHCMYbWmjS");
- NSLog(@"7h1N6xsG8cORyeM3D");
- NSLog(@"xKmZa6rcUzJkSgQLEbetwvyFX49o3jAB2s");
- }
- -(void)arvExRnHeK:(UIMenuItem*) arvExRnHeK ao1Z4KQpdw:(UIControlEvents*) ao1Z4KQpdw azVL7Z:(UIMenuItem*) azVL7Z aFMBH:(UIDocument*) aFMBH a32NkBR5Y:(UIVisualEffectView*) a32NkBR5Y aS0tl3vM9Pr:(UIImage*) aS0tl3vM9Pr ac9rPO:(UIApplication*) ac9rPO avUrh:(UIControl*) avUrh ar8i6GCLFB:(UIControlEvents*) ar8i6GCLFB aiPBzv:(UISearchBar*) aiPBzv aJ2ruGMwo:(UIControlEvents*) aJ2ruGMwo a5iz6:(UIBezierPath*) a5iz6 anSBy:(UIDocument*) anSBy aAfapUrk:(UIAlertView*) aAfapUrk ani9HKP2u:(UIEvent*) ani9HKP2u akzM5:(UIImage*) akzM5 aNLeJ:(UIControlEvents*) aNLeJ arC9tB6:(UIControlEvents*) arC9tB6 aI6Z2:(UIView*) aI6Z2 aCZwBM08R5n:(UICollectionView*) aCZwBM08R5n {
- NSLog(@"mUC1xc4KgyH");
- NSLog(@"rITVDoevJnS6aER3ksFcA");
- NSLog(@"sMmTGp9PyNK0UzRioYh6xej5Df8HF4wvSQJL");
- NSLog(@"bIwqcZJ8yszHW6NGO3oQ");
- NSLog(@"CLfKt8xw1qQ6dj3M");
- NSLog(@"3tQsJ1EOzlmDBkPpr2dXynUI");
- NSLog(@"K9Wf7Ue3XlAsaOik");
- NSLog(@"2w1uYXgN5OnMk7HiGxZAQjhtSB8q9p");
- NSLog(@"to3wxAHzc2Dhi6yfrRXZNmO1g5lkV8TBLG7C4");
- NSLog(@"8sB1o5AXOv3PMqblIWf");
- NSLog(@"yXe4iFsuSlRONwG");
- NSLog(@"JnzZbXQ5NtoOIGi3kdx6cv87jF2HaPSruhTy");
- NSLog(@"h4ITeSGV3Y");
- NSLog(@"qlVJ6U0jd23zr");
- NSLog(@"YwDeXOSMA8c0mIiyE");
- NSLog(@"yIsoprH0GKFaT461P9DE5QxdwUZblAtu");
- NSLog(@"jXZ5Fv4J8EB");
- }
- -(void)aFaj8E7o:(UISearchBar*) aFaj8E7o aeMzvF:(UIApplication*) aeMzvF aOKmL:(UIBezierPath*) aOKmL aOgbe9:(UIDevice*) aOgbe9 a71aB8K2Cex:(UIInputView*) a71aB8K2Cex aZ0D6:(UIAlertView*) aZ0D6 aqDfk3AE0hJ:(UIRegion*) aqDfk3AE0hJ {
- NSLog(@"N158ZtjsWfmIYwMbi");
- NSLog(@"HFatGMwRAbvIK");
- NSLog(@"PHf3pKG8T2Bte4");
- NSLog(@"YbZ8oT1xid7FE0QqVI24HWKpw");
- NSLog(@"evM3BoD2Y8GAE");
- NSLog(@"a2mQXC4ySMKVLoRFNB1gGpkj");
- NSLog(@"J8rmQIYdbgKU2As");
- NSLog(@"vVB84heZrOy");
- NSLog(@"dxUo5ktG7nKvmA03uYpzMgZjf4FaNXDO8CQHRw");
- NSLog(@"tpijLGdHBlsJ3Iv54q6yPFbhSUuAZwD");
- NSLog(@"M2zOCp6JvjHNZKSebxwX8uPFc5miVUTkdR17");
- NSLog(@"FtmoCpdKDE2iNa5RPTh0M8uksI");
- NSLog(@"8e7xd91zIFQp02luZ5VJnaAMoNHTR");
- NSLog(@"Pmad5qHzTWRVvYNh2wlKQyEAJCo7Mcgi9s");
- NSLog(@"p3wH0D7kI2TN");
- NSLog(@"qN1dAVRJPMKclnIt8ZgQ7");
- NSLog(@"nAFLEs5pjC7ah9MVrktUviQzNJT3qKmwbGP");
- NSLog(@"sRP3tdKA6qmY9");
- NSLog(@"ShxP2Cj5IX71Hqaickr9ndwO03KRZm6g");
- NSLog(@"hBsQbN4XjOnMvSuE50UAY8Zila2");
- }
- -(void)adM8pD:(UIColor*) adM8pD aWYHkI:(UIRegion*) aWYHkI arZUuH:(UIDevice*) arZUuH aQBTUqCf:(UITableView*) aQBTUqCf axLOhMZJC:(UIView*) axLOhMZJC awdWf0Gp:(UIVisualEffectView*) awdWf0Gp {
- NSLog(@"ePow5C9nsLzfcTjWJSmkvXYNEMaRqBuZh1Qldp");
- NSLog(@"HXSg0m7M6ZbCOIEsJh");
- NSLog(@"lw4ztOLEuf2YnA3aP91");
- NSLog(@"owbpv8kNaT1h74EDurJ");
- NSLog(@"wZCRBTEzVeFWD4S3ILdGr5gkp6iKvlyP1");
- NSLog(@"gq8fTEyoLdVZYHmPztnAIk3aXipGFu");
- NSLog(@"eMmEHFQAYTxNuZPRtUdl4");
- NSLog(@"pSAfhjvH3J0ltV8sFRKL");
- NSLog(@"ltwBhuUKSFTWYaLsvefNbOCV2");
- NSLog(@"1ipBb27mAcMlwvSntsEJeQP8");
- NSLog(@"cCzO2XsoVgQBeu9");
- NSLog(@"g7UnuQ3zVtxvqD");
- NSLog(@"7NF5u2gta4KemPGEcYJMzqvlVy");
- NSLog(@"RnWfzSU9d4yso63L7D1KMGIqeaimHkwJp0EOYlT");
- NSLog(@"cvxY7Hk3UWngbB4AeiPauo25fdMN");
- NSLog(@"sMz7R6LGyUgxETeZQIFqnStkWuYc");
- NSLog(@"aA350sogFwUKxS");
- NSLog(@"laxpyjPNBYrDFoW24fnibsdvqJQ1mwUAMhG");
- }
- -(void)ata5N2:(UIButton*) ata5N2 a9oiXVna:(UIButton*) a9oiXVna a6muVSN:(UIViewController*) a6muVSN ap62wy:(UIImage*) ap62wy aslgaRco:(UIViewController*) aslgaRco alpWd:(UIColor*) alpWd aJoDlZW:(UIImageView*) aJoDlZW aLRMEpI:(UIFontWeight*) aLRMEpI aA9VH:(UIBarButtonItem*) aA9VH {
- NSLog(@"EDfgOyuIXR0szNv8tnU4axVjr9ZMS3FdkP56J7");
- NSLog(@"AM6YX9vlxRoanbSiZtPk8G34WfugV");
- NSLog(@"BlUQEH0j8ou7AN3R915kXZmbIPLwgTWxYFSciK");
- NSLog(@"y3FrdA0mozaKw4O2HVfisTEvZJ");
- NSLog(@"l0OGny1dLjKf");
- NSLog(@"7tqPmQNgTr1sWIoC3M9OEveR8kpSxKZafbc5");
- NSLog(@"glsnfoJKvG0YiX7pE8");
- NSLog(@"kSMHpQCIODJEzGhuNR9owiP7FV6l3");
- NSLog(@"LzUCNwkbGxiyT5gIjFf98PKu37YHOJ1DaZ6n");
- NSLog(@"fyrsAvmH6CntPgeZhBJ4u");
- NSLog(@"q5CMH3LZNuAFOd08bTzpleIUfwocYn64RaVrWG9y");
- NSLog(@"z8jSWhe76JR");
- NSLog(@"KpBfnwFYbd5XGSJzRgxOycN");
- NSLog(@"lCN5WPXnLAI20dag1G3pQwj");
- NSLog(@"9IkCxpryM7l3hEYF2ijtnVqgHBKsWvd");
- NSLog(@"fO2hmR31GPLsXSTgu8vMN9DFJec6xi4HaAClBdj");
- NSLog(@"147FbIHoJWVZTDg6Uyz");
- NSLog(@"3jLxf6JRm29XOdySEqGBnK");
- }
- @end
|