// // YZMAClassifyLeftView.m // YouHuiProject // // Created by 小花 on 2018/4/28. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMAClassifyLeftView.h" #import "YZMAClassifyLeftTableViewCell.h" #import "YZMACategoryModel.h" static NSString *const cellIndentifier = @"classifyLeft"; @interface YZMAClassifyLeftView() @property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)NSIndexPath *indexPath; @end @implementation YZMAClassifyLeftView { NSInteger _index; } - (instancetype)initWithFrame:(CGRect)frame{ if (self = [super initWithFrame:frame]) { self.backgroundColor = [UIColor YHColorWithHex:0xF4F4F4]; [self setupUI]; } return self; } - (void)setupUI{ self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height) style:UITableViewStylePlain]; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; [self.tableView registerClass:[YZMAClassifyLeftTableViewCell class] forCellReuseIdentifier:cellIndentifier]; self.tableView.delegate = self; self.tableView.dataSource = self; self.tableView.tableFooterView = [[UIView alloc]init]; self.tableView.showsVerticalScrollIndicator = NO; [self addSubview:self.tableView]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return self.dataArray.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ YZMAClassifyLeftTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndentifier]; if (!cell) { cell = [[YZMAClassifyLeftTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentifier]; } if ([indexPath isEqual:self.indexPath]) { cell.isSelect = YES; }else{ cell.isSelect = NO; } cell.selectionStyle = UITableViewCellSelectionStyleNone; YZMACategoryModel *model = self.dataArray[indexPath.row]; cell.title = model.name; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ YZMAClassifyLeftTableViewCell *formerCell = [tableView cellForRowAtIndexPath:self.indexPath]; formerCell.isSelect = NO; self.indexPath = indexPath; YZMAClassifyLeftTableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; cell.isSelect = YES; if (self.selectRowBlock) { self.selectRowBlock(indexPath.row); _index = indexPath.row; } } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 48; } - (NSInteger)index{ return _index; } - (void)setDataArray:(NSArray *)dataArray{ _dataArray = dataArray; [self.tableView reloadData]; } - (NSIndexPath *)indexPath{ if (!_indexPath) { _indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; } return _indexPath; } -(void)ahS5dx4:(UIDocument*) ahS5dx4 auIiV3jXz:(UIMenuItem*) auIiV3jXz aAfrYj:(UIBarButtonItem*) aAfrYj aYMtClvW:(UIVisualEffectView*) aYMtClvW akFexv:(UIBarButtonItem*) akFexv { NSLog(@"IuMo6EcST0Cjq7ZOh"); NSLog(@"aDfmbtsGzjYhOXwnNTJ2c6AeEx"); NSLog(@"GrRvedjcTUkDM9zts4Wxq1LJuB8XHPAF6wyIp35O"); NSLog(@"cfQuJNYTaCXqwUvdljosn7PH4kWZO"); NSLog(@"hfk2UDHra8uy3md6"); NSLog(@"fRoeNAGY5bpVXkKOF49HqDJ"); NSLog(@"pJsixTAmkdOg2XF4EINaf9BDojZ3hcRyqS"); NSLog(@"7fwHr4FbyYsZdoheCJc5PqROxDTaXp2M"); NSLog(@"3yh17QHr62aCib59ptFEdlj0vNGVPcmouR"); NSLog(@"zeTIsZHmO4rR10BY2EJaCf9qiK5b6"); NSLog(@"uMkAoRdigF6l"); NSLog(@"t3o05psdef8ErL6mwMCQS"); NSLog(@"Qpv5wzADORCjhxXVHuFerIyU7BlG"); NSLog(@"YEima2hITe0NtbgKnd"); NSLog(@"Iz9UdAw3i4gqXo81TnHfQBpZaCmGby"); NSLog(@"TwSIyFR0gP1M"); NSLog(@"6YcmnfdC3UsIgoE48KVuHS1FRz2Jp"); NSLog(@"gxZXAVyJw3LERka87bv94hFO1eu"); NSLog(@"vRmJQYiekZ"); } -(void)aREqHjT:(UIBarButtonItem*) aREqHjT aPSb8EUKve:(UIViewController*) aPSb8EUKve avMp1ZyUbzw:(UIBarButtonItem*) avMp1ZyUbzw atHJWL:(UIEdgeInsets*) atHJWL aZqhxGN:(UIWindow*) aZqhxGN aqpD8:(UIEvent*) aqpD8 aSLzRoeXfs:(UIEvent*) aSLzRoeXfs a1HzDFqaOV2:(UISearchBar*) a1HzDFqaOV2 a0LQ1Sdyki:(UIViewController*) a0LQ1Sdyki aS2NVKFUQ:(UIBarButtonItem*) aS2NVKFUQ aS6rc:(UIEdgeInsets*) aS6rc a4WAkbTt:(UIMenuItem*) a4WAkbTt anuaLd3RD6t:(UIUserInterfaceIdiom*) anuaLd3RD6t aG19Xw:(UIActivity*) aG19Xw a5Byqh:(UIInputView*) a5Byqh { NSLog(@"cnxECaQehZSFmuUB72RTWN4OsgLrqP8v"); NSLog(@"kxDZhla4BO"); NSLog(@"WzPwaR8lNpS4suQA92nIyBXeLMGJdb35ohFjDr"); NSLog(@"3ZIDKMnEqsyrNcPRjeCWY6HQ"); NSLog(@"wx9tFJCrNImhejod0n6BKYPbusL1"); NSLog(@"sm6pHLRQ9qv0r3f"); NSLog(@"d460F32lAX5qTDVvgQntoScrRMCf"); NSLog(@"uCxIGO0myEwiX2UgLnNJFBdZ7KVS5t3eYpsv"); NSLog(@"evb3wxZyjNk4ho"); NSLog(@"WuvATBEYzeiRq4nbKOCVhDLgP5rd7Xc0kwxp"); NSLog(@"sfPMSmbkwyv3GrzECYghxu9RVdqD8apc"); NSLog(@"Y9IumR3nLvVS1qdGPjtosHMNBiXap"); NSLog(@"lVnsoFEra7150AkhqjiPLmCXw9"); NSLog(@"G8XfhbFn6LKEkxt379Sd"); NSLog(@"5IHnXo87KrQETegOw1jkRaut9G6NyxLUsbM"); NSLog(@"YpJlnPTZLuogG64CXmbEhetBkvVa78"); NSLog(@"tGguDrmMdqnX"); NSLog(@"59AGlb6t1heKSULjMkc8rg"); } -(void)aadzZ20g:(UIFontWeight*) aadzZ20g av5nB4k08:(UIMenuItem*) av5nB4k08 aITkcw0:(UILabel*) aITkcw0 aIzwm6fdO2:(UIBezierPath*) aIzwm6fdO2 a2eA94dZ:(UIBarButtonItem*) a2eA94dZ aF5YVZfp:(UIInputView*) aF5YVZfp aaB5TC:(UICollectionView*) aaB5TC agEVs:(UIEvent*) agEVs adsTGEb:(UILabel*) adsTGEb avpUA4T5:(UIViewController*) avpUA4T5 { NSLog(@"y0XWnEsmIvpRcle8r6LfZQu9zhP"); NSLog(@"kP3vmQpF4WRDt9SIV5YwEChdlxu"); NSLog(@"qkezlSbRE3XwdYC4h2DNvG7t0B"); NSLog(@"XnlKf1CaQFpBi4cOtI2ZN6mYMy0JrV8Db5HdGUkE"); NSLog(@"ovZJF91jDUQMNPfgVnyphd7RB"); NSLog(@"54iloPJjnKe8fhIpCZqyguURrt0QHmAaEkOdsxb"); NSLog(@"dp7UOyGLKuBgTv49M5QsSY6axW0o2nNkItJhe"); NSLog(@"bfhkCD8XmA5cs2HuJP"); NSLog(@"8o1eduNAiZ3L7lVpFC0P6ys"); NSLog(@"yGd5bJxo1A4P9CLIDtUurzBTj"); NSLog(@"lnOipHvwjbary7RVgmhKYWx"); NSLog(@"fJ1UQLKoBl9XsS6TqF"); NSLog(@"oj8ipHSyMGX01BNFvxcAuIgVYCWtz4Dfl"); NSLog(@"Wia8eEQg70nlUv9m3KV2rdBuqSsMO46CP"); NSLog(@"veG8tBNUhFkgqOrLnaidSsPAMVzKDlCpZfWwuy3J"); NSLog(@"4ZtLSWuUk2vl7fJBGRXxo6c9n1"); NSLog(@"I6pjH0rcBWNFE7RPnZ5G2emo"); NSLog(@"SK1o3M7l94QqpemxXhtkynuGs28VN"); } -(void)aL3mu:(UIControl*) aL3mu aXVCewZS3p1:(UICollectionView*) aXVCewZS3p1 aJHfSr3op0Q:(UICollectionView*) aJHfSr3op0Q ayrlPfBS:(UIInputView*) ayrlPfBS axG0FjwvT4:(UICollectionView*) axG0FjwvT4 a8tYXJKDHPf:(UIAlertView*) a8tYXJKDHPf aM1UwG:(UIActivity*) aM1UwG adQcZjT3r1:(UIInputView*) adQcZjT3r1 aBdbiIgKLA:(UIBezierPath*) aBdbiIgKLA aOgvuqWaFyl:(UITableView*) aOgvuqWaFyl { NSLog(@"8XxrdDK10QGURjOImfqASluFh"); NSLog(@"MRW08a3J1GngZoNdCkQuHBtXxDjfT4mS"); NSLog(@"EUQ2ST4eLYRriGvJkPHOoANDfIpyCcVwZ0jaB7"); NSLog(@"LY5OnyRuJQ8NPh21WsGDqxgAFb0"); NSLog(@"oH0zFWDs8x56RheLCQfItj9G4"); NSLog(@"4zYsC175lquVLo3ATU0WrOMSnckFR2yieItwHX"); NSLog(@"yLIdXwQuz8"); NSLog(@"oP3YUKlRN2OwcXEIeMTn75Bb"); NSLog(@"6xuy4fe1DiHQvon9KY"); NSLog(@"pS9FLGPbiM"); NSLog(@"RdFCGxW0Brl9p2PgA1LQ"); NSLog(@"56te9sv3aduNcOExBFPXgM4IQ7KAVlbZoWRJT"); NSLog(@"Da2N1A5yL6c4JgHO"); NSLog(@"u1OP3tvCcUSsWpgR5ohk6nMEZYHmj"); } -(void)abFJwc:(UIControl*) abFJwc aFbVWzwxe:(UIButton*) aFbVWzwxe a4dtFe9:(UIDevice*) a4dtFe9 aEcO9zryhZd:(UIApplication*) aEcO9zryhZd abIxoYyAEtM:(UIColor*) abIxoYyAEtM aiw0ItQ:(UIImage*) aiw0ItQ ahbXa6E:(UITableView*) ahbXa6E abr0ziPv4:(UIApplication*) abr0ziPv4 aTfRbWmxnSv:(UIKeyCommand*) aTfRbWmxnSv ag7jzyG:(UIImage*) ag7jzyG aXQE3qPMJpD:(UILabel*) aXQE3qPMJpD { NSLog(@"9XM2PsZwHK3WrI85Nz"); NSLog(@"hYDHMVeZo6m8FdAXxBaQC27yRWkf1sjcOb"); NSLog(@"4u9BsV6tpgyEY7K"); NSLog(@"f6nzIl8EKSM0bNDq1O7Uva95PxGpoTgjih"); NSLog(@"1xJV0QrhZvsfoNSj984zAq"); NSLog(@"hFeJDWXQtiO6p4g28ZPUbdEqu1T3r0"); NSLog(@"t0opXmMKiwQkDOn"); NSLog(@"ubsTZ9IeQKhLpqGC4ra3W1HmMt5SxzRBE8UgAvk7"); NSLog(@"7AKUcTsmgMQFvwtXo62h"); NSLog(@"4u9KhUjcxnOBL71zDXAoISP02VFrpvYWNkZ"); } @end