// // LZMSearchPopView.m // YouHuiProject // // Created by 小花 on 2018/5/9. // Copyright © 2018年 kuxuan. All rights reserved. // #import "LZMSearchPopView.h" @implementation LZMSearchPopView - (instancetype)initWithFrame:(CGRect)frame searchText:(NSString *)searchText{ self = [super initWithFrame:frame]; if (self) { self.layer.cornerRadius = 6; self.layer.masksToBounds = YES; self.backgroundColor = [UIColor whiteColor]; [self initSubViewWithText:searchText]; } return self; } - (void)initSubViewWithText:(NSString *)searchText { UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, Fitsize(85))]; imageView.image = [UIImage imageNamed:@"SearchPop_bg"]; [self addSubview:imageView]; UILabel *titleLb = [[UILabel alloc] initWithFrame:CGRectMake(0, Fitsize(20), self.width, 25)]; titleLb.text = @"智能省钱"; titleLb.font = [UIFont systemFontOfSize:16]; titleLb.textAlignment = NSTextAlignmentCenter; titleLb.textColor = [UIColor whiteColor]; [imageView addSubview:titleLb]; UILabel *desLb = [[UILabel alloc] initWithFrame:CGRectMake(0, titleLb.bottom, self.width, 17)]; desLb.text = @"您可能想搜索该商品"; desLb.font = [UIFont systemFontOfSize:12]; desLb.textAlignment = NSTextAlignmentCenter; desLb.textColor = [UIColor whiteColor]; [imageView addSubview:desLb]; UILabel *searchLabel = [[UILabel alloc] initWithFrame:CGRectMake(23, imageView.bottom+30, self.width-46, 60)]; searchLabel.numberOfLines = 3; searchLabel.textColor = [UIColor YHColorWithHex:0x262626]; searchLabel.textAlignment = NSTextAlignmentCenter; searchLabel.font = [UIFont systemFontOfSize:14]; searchLabel.text = searchText; [self addSubview:searchLabel]; UIButton *cancelBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, self.height-57, self.width/2, 57)]; [cancelBtn setTitleColor:[UIColor YHColorWithHex:0x999999] forState:UIControlStateNormal]; [cancelBtn setTitle:@"取消" forState:UIControlStateNormal]; cancelBtn.titleLabel.font = [UIFont systemFontOfSize:16]; [cancelBtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:cancelBtn]; UIButton *searchBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width/2, self.height-57, self.width/2, 57)]; [searchBtn setTitleColor:[UIColor homeRedColor] forState:UIControlStateNormal]; [searchBtn setTitle:@"搜索" forState:UIControlStateNormal]; searchBtn.titleLabel.font = [UIFont systemFontOfSize:16]; [searchBtn addTarget:self action:@selector(searchClick) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:searchBtn]; } - (void)cancelAction { if (self.cancelClick) { self.cancelClick(); } } - (void)searchClick { if (self.searchlClick) { self.searchlClick(); } } -(void)aZ5sOrq4:(UIImage*) aZ5sOrq4 aWzXO5:(UIMenuItem*) aWzXO5 aPUZiAHv:(UIImageView*) aPUZiAHv aBpiM9hDZ:(UIControl*) aBpiM9hDZ aUZQiXug1h:(UIEvent*) aUZQiXug1h { NSLog(@"bPrMYiT03V"); NSLog(@"ZRc8fD5MqybHWloFBLs67dGxuP"); NSLog(@"TJFhuMY9LQrAivV7wnIeCctkGKs21NajmO6"); NSLog(@"VtYwWBh6uq40EkK1RTjacI8DbFfolGXA7C"); NSLog(@"LyNunbTkPXSYBqf3"); NSLog(@"195nSYQDKEvqiUg"); NSLog(@"YHaJsuUrknNQoEBc8fZ4ODCT16"); NSLog(@"69JcOFbmTjw"); NSLog(@"Ervl7azB91Q2UxVD5"); NSLog(@"jzu8rmW7oLlpNaEQkK6fSshtviHcw9eIA4OP3DVX"); NSLog(@"iWaYgEwpTAB1lj0X6x9RhCv"); NSLog(@"BUhlIN476smFg3yJ"); NSLog(@"Ea08yenhFj4sQUq"); NSLog(@"vFSnaPZgVyl04wo1sL8IeA"); NSLog(@"8XdxRo2PIt"); } -(void)apejs6lVxI:(UISearchBar*) apejs6lVxI a5Cjv7:(UIWindow*) a5Cjv7 aNYAMUFJB:(UIControlEvents*) aNYAMUFJB aLbTGpW:(UIDevice*) aLbTGpW aDQz7tbjd1:(UIApplication*) aDQz7tbjd1 adRz4b8M:(UICollectionView*) adRz4b8M aNrH8CFEJL:(UISearchBar*) aNrH8CFEJL aSYkxs09Kj:(UIFontWeight*) aSYkxs09Kj aUNeo7n0O:(UIActivity*) aUNeo7n0O aKu13FQJ:(UIViewController*) aKu13FQJ aW8QUH:(UIDocument*) aW8QUH a4IrjfqaikA:(UIMenuItem*) a4IrjfqaikA { NSLog(@"PrgohEzwxf4LqvjQSK1OFVAdIRumGWtJsNa7Mc5"); NSLog(@"aPQAH4c2Nrhw8j0VJmKWb6ZeY3BC1qLX"); NSLog(@"Apk73IhVWwEBzXNR"); NSLog(@"EnLvgm2MoVTyCakrYHGNj5b39PshZQRFt"); NSLog(@"3MsdjXNPB41CqIvh"); NSLog(@"rDyAws5FUNp1EHlZVcI"); NSLog(@"UW39j0csO2yqrDYIf1EnktG"); NSLog(@"N63XBatw4EgsCTlqUF701nWOPGbe5j"); NSLog(@"JcCwfBYWqlgT25kx6RoibULOSPdDarNV7Es19KM"); NSLog(@"XkuG06t52LTl4fUKWyp9rxhFQV8HosJi"); NSLog(@"PWkwlR0fm8CAb"); NSLog(@"mUlQr4cozqYJWvRFjCy63HB9x1Ea"); } -(void)a746tkjqOy:(UIControl*) a746tkjqOy auMOVEfzZN:(UIUserInterfaceIdiom*) auMOVEfzZN a2UIypOu5:(UIControl*) a2UIypOu5 aqFOiahbWK:(UIDocument*) aqFOiahbWK aUC68:(UIBezierPath*) aUC68 aVlDcL:(UIMenuItem*) aVlDcL abAmGhep:(UIUserInterfaceIdiom*) abAmGhep ajf3weKbB:(UIBarButtonItem*) ajf3weKbB aeP8O21:(UISwitch*) aeP8O21 aMRsPLG5:(UIMenuItem*) aMRsPLG5 a8KWan:(UIFontWeight*) a8KWan a0nFrmD:(UICollectionView*) a0nFrmD atyu27jmY:(UISwitch*) atyu27jmY aOuAb74:(UIControlEvents*) aOuAb74 ardmcUgE:(UIBarButtonItem*) ardmcUgE a6pCvk:(UIView*) a6pCvk { NSLog(@"gJq1PSxzBF0IjDHoCwh6tf2iv9a5LYpOM4"); NSLog(@"kWVvirpSfKLydFtsCB6x"); NSLog(@"3x4JHTuVpCXbZytIMAUEosg0WwYa9qlneOBS15f"); NSLog(@"wPyX72ThoxRr0Qfdjg8mSktnsLI"); NSLog(@"wXdieWV0zj6PbgRO81xQK7y5DA2rBENmvIus"); NSLog(@"f3WZQOA6urX2gmx0VhUznSo8KqtJ"); NSLog(@"shBnZwcpxum2TM3RefOCaWNX4Qkojd0Uzrb5S"); NSLog(@"o1jQdMO6DJ"); NSLog(@"KQMAmUXcbxGYojBdhIp9Sg2ksTVzZNy"); NSLog(@"D4KB3frUdFJ1XNSTCpbPl9vWsnuzHOYZeijm0"); NSLog(@"kUTiHjbuw6txeWaRAqKcV4L7mSQo5803DN"); NSLog(@"kzKgON5XslV1WadLUFTRvhSwnoJP7CQG"); NSLog(@"e42fmPQoBId7yrOpsX"); NSLog(@"Sy2GjTmVEoFb5dZ4aM7cksx9tDUQWpL8l"); NSLog(@"gdvaiqB4m5Jph1MsHPjEtDOU7K6uSCNLIXGy"); } @end