123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- //
- // JZBudgetTableViewCell.m
- // JIZHANG
- //
- // Created by kuxuan on 2017/12/27.
- // Copyright © 2017年 kuxuan. All rights reserved.
- //
- #import "JZBudgetTableViewCell.h"
- @interface JZBudgetTableViewCell()
- @property (nonatomic, strong) UILabel *nameLabel;
- @property (nonatomic, strong) UILabel *detailLabel;
- @property (nonatomic, strong) UISwitch *cellSwitch;
- @property (nonatomic, strong) UIImageView *rightImageView;
- @property (nonatomic, assign) NSInteger index;
- @end
- @implementation JZBudgetTableViewCell
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- self.selectionStyle = UITableViewCellSelectionStyleNone;
- self.backgroundColor=[UIColor JZColorWithHex:0xefeff4];
- [self setupUI];
- }
- return self;
- }
- - (void)setupUI {
- UIView *white = [[UIView alloc]init];
- white.backgroundColor = [UIColor whiteColor];
- [self.contentView addSubview:white];
-
- UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- nameLabel.backgroundColor = [UIColor whiteColor];
- nameLabel.font = FONT_SYS(FitSize(15));
- nameLabel.textColor = [UIColor middleTitleColor];
- [self.contentView addSubview:nameLabel];
- self.nameLabel = nameLabel;
-
- UISwitch *cellSwitch = [[UISwitch alloc] initWithFrame:CGRectZero];
- cellSwitch.onTintColor = [UIColor baseColor];
- [cellSwitch addTarget:self action:@selector(cellSwitchAction:) forControlEvents:UIControlEventValueChanged];
- [self.contentView addSubview:cellSwitch];
- self.cellSwitch = cellSwitch;
-
- UIImageView *rightImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
- rightImageView.backgroundColor = [UIColor whiteColor];
- rightImageView.image = [UIImage imageNamed:@"mine_person_arrows"];
- [self.contentView addSubview:rightImageView];
- self.rightImageView = rightImageView;
-
- self.explainLabel = [[UILabel alloc]init];
- self.explainLabel.textColor = [UIColor middleTitleColor];
- self.explainLabel.font = FONT_SYS(10);
- [self.contentView addSubview:self.explainLabel];
-
- self.detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 200, 0, 160, 44)];
- self.detailLabel.font = FONT_SYS(FitSize(15));
- self.detailLabel.textColor = [UIColor detailTitleColor];
- self.detailLabel.textAlignment = NSTextAlignmentRight;
- [self.contentView addSubview:self.detailLabel];
-
-
- [white mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView);
- make.top.equalTo(self.contentView);
- make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 44));
- }];
-
- [rightImageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.equalTo(self.contentView).offset(-FitSize(15));
- make.centerY.equalTo(white.mas_centerY);
- make.size.mas_equalTo(CGSizeMake(FitSize(6), FitSize(12)));
- }];
-
- [cellSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.equalTo(self.contentView).offset(-FitSize(15));
- make.centerY.equalTo(white.mas_centerY);
- }];
-
- [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView).offset(FitSize(15));
- make.centerY.equalTo(white.mas_centerY);
- make.width.equalTo(@100);
- }];
-
- [self.explainLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView).offset(FitSize(15));
- make.top.equalTo(white.mas_bottom);
- make.bottom.equalTo(self.contentView.mas_bottom);
- }];
-
- }
- - (void)refreshName:(NSString *)name isSwitchOn:(BOOL)isSwitchOn isShowSwitch:(BOOL)isShowSwitch sectionIndex:(NSInteger)index {
- self.index = index;
- self.nameLabel.text = name;
- if (isShowSwitch) {
- self.cellSwitch.hidden = NO;
- self.rightImageView.hidden = YES;
- [self.cellSwitch setOn:isSwitchOn];
- }
- else {
- self.cellSwitch.hidden = YES;
- self.rightImageView.hidden = NO;
- }
- }
- - (void)cellSwitchAction:(UISwitch *)sender {
- if ([self.delegate respondsToSelector:@selector(JZBudgetTableViewCellSwitch:index:)]) {
- [self.delegate JZBudgetTableViewCellSwitch:sender.isOn index:self.index];
- }
- }
- - (void)setDetailString:(NSString *)detailString{
- _detailString = detailString;
- self.detailLabel.text = detailString;
- }
- -(void)aSQAF2:(UITableView*) aSQAF2 anELvjzxtA:(UIEdgeInsets*) anELvjzxtA aqhEQG8Xn9:(UIBarButtonItem*) aqhEQG8Xn9 aml8f:(UICollectionView*) aml8f aT96FoDb:(UIBezierPath*) aT96FoDb aAu6v4iyf:(UIEdgeInsets*) aAu6v4iyf aoXkd:(UICollectionView*) aoXkd a35WcVe:(UIUserInterfaceIdiom*) a35WcVe aLWfONg5:(UIControl*) aLWfONg5 {
- NSLog(@"gmsijw4S0MzD2tZBuL1R9r6oIQEWhXb");
- NSLog(@"FBiscx14Ee52RVNIS8o3THGKMnfqJ6wWDLpbmy0u");
- NSLog(@"QXvdVkZKJu0lozTNwSMDO4Ib3RjnYfxry");
- NSLog(@"UyTX6fbK957Fn0EcSrWDQgz");
- NSLog(@"0AIKERtqNGfr1YvazSh9");
- NSLog(@"Bhy8ipTCFZA6Rj4dIozmOLW7vakJxgnwsG1Q0N");
- NSLog(@"PT9djD3VxqJvelO");
- NSLog(@"X1rPeG3NYOh8yDVtaBMC96jHpbE");
- NSLog(@"GOmhHLYf4BueW");
- NSLog(@"rnaRNbqZAB43S5");
- NSLog(@"iSy1aflTK8dsPO3oA5MvR9p6VNjQec");
- NSLog(@"KT1mqsliWL0jwb4FB78cUgXtdv");
- NSLog(@"3StxDloEBN0ajOvigC7rZX");
- }
- -(void)aqkHU4I7s:(UIFontWeight*) aqkHU4I7s a9Ynr:(UIControlEvents*) a9Ynr azSTa:(UICollectionView*) azSTa ahHXbDoPN:(UISearchBar*) ahHXbDoPN adYQGF5I:(UIControl*) adYQGF5I acrBjuNE:(UIKeyCommand*) acrBjuNE {
- NSLog(@"5iVMHWmPYjGaUvO92EKC7yB");
- NSLog(@"bPmXs0UzhM4wNq9TIVpjfFgoA5c");
- NSLog(@"W67mDguZcHwoNJVtipLYG1");
- NSLog(@"L6E1No2fZCy9rGmBQUc3WVJx5");
- NSLog(@"3Sw4lCOsT0X");
- NSLog(@"cPiBXLVb3oZRyHCDpkze2rwvAs");
- NSLog(@"B3mZjokJTnPEx");
- NSLog(@"QAMyHN7dJiTRt1WaSDCc6UOPeobFpE");
- NSLog(@"3O9uWKiCc1s5E0wJrYavpkz6VQ");
- NSLog(@"6x1GabkupjCSrsyF7wJ4oN5Dqf9OQAHUTdmihR");
- NSLog(@"ogbAH9PQdsG7Myvxt");
- NSLog(@"qLmB2ds5GHt");
- NSLog(@"1RYK905kPl64EqFU2I");
- NSLog(@"9e1p8gFzlxRkQ6TBjG7");
- NSLog(@"bJ8W4enpTkRawvo705qDLsj");
- NSLog(@"JRcuAmSfxzvCTwFdN3Yn9O");
- NSLog(@"vs6EngwIo0qupOdSJBDxRFmZ28");
- }
- -(void)aXJMK:(UIActivity*) aXJMK arIopTU9h8a:(UITableView*) arIopTU9h8a arIiH:(UIMenuItem*) arIiH aFrlVuGx:(UIView*) aFrlVuGx aXeFKag:(UIViewController*) aXeFKag a1THOK:(UIView*) a1THOK aML2k:(UIMenuItem*) aML2k aZjU1PJk:(UIViewController*) aZjU1PJk aIgUly:(UISwitch*) aIgUly aQhGK8kN0lb:(UIApplication*) aQhGK8kN0lb aZsTxdIE:(UIBarButtonItem*) aZsTxdIE aSiLABN:(UIDocument*) aSiLABN aL65P:(UIDocument*) aL65P {
- NSLog(@"snycqTu3RB951QbGNOKFEtxgdM2Im6ijvAhWk4Dw");
- NSLog(@"zucdg8vDpeIkfaj726iwJ3oYhbXlKZQMS41Trq");
- NSLog(@"7xAdHr0TyCn5wfDXmBepOM");
- NSLog(@"LvBl57m6YTZMEVSW");
- NSLog(@"qClJ9V5db1SZ");
- NSLog(@"VT3wha7GoiYx6I9fs");
- NSLog(@"T0xUy4Sh19sget7nwPAQzMEr");
- NSLog(@"s6U3mZODpWQJEgXuaTY58dxj");
- NSLog(@"HROsk7Jhe8xYwpy2nm");
- NSLog(@"cPSJFfexA7oZDVpqt09ndXvsMIh8");
- NSLog(@"Oq49IBPZV6wTFMEnhz0LjKNJ");
- NSLog(@"6cQ0YAWINExJ");
- NSLog(@"tngOF59VCYXEbaoI84v6msPpRelcB");
- NSLog(@"HIqAP3REUQTKmS8");
- NSLog(@"dt7hnx8iQKHP2");
- }
- -(void)aHcyFb0ew:(UIColor*) aHcyFb0ew apM49FoTeSB:(UISearchBar*) apM49FoTeSB akBtGXL:(UIFontWeight*) akBtGXL aKlz98qn6gP:(UIBarButtonItem*) aKlz98qn6gP a8dUukR6Ggi:(UICollectionView*) a8dUukR6Ggi aSZzE:(UIEdgeInsets*) aSZzE a4NcHv7EbD1:(UISwitch*) a4NcHv7EbD1 ay8ENTUJ1e:(UIEvent*) ay8ENTUJ1e agyHF34t2:(UIScreen*) agyHF34t2 aGgeV5m2qsN:(UIDocument*) aGgeV5m2qsN aQBeLzCbfv:(UILabel*) aQBeLzCbfv aeG4kUA5:(UIBarButtonItem*) aeG4kUA5 alD1K5:(UIBezierPath*) alD1K5 anG6AJ172W:(UIVisualEffectView*) anG6AJ172W aCPlH:(UIView*) aCPlH aa6x3A12:(UIScreen*) aa6x3A12 aLeMVAZXwY:(UIRegion*) aLeMVAZXwY {
- NSLog(@"Ksjx2c01aItkOwNedQBYP8nhGUF7");
- NSLog(@"KVQoXhF6cvNgbCTax7ysl");
- NSLog(@"any60Q8t5j4B1fdRYNiLsoGOSeTUgb3v2rEHAXVw");
- NSLog(@"tgMh6W35aPycHOkZmrEw");
- NSLog(@"SyawZjLXIY516Pd3t7pxGCevhkR9J");
- NSLog(@"jn1hfBDxyp7EWg2T4");
- NSLog(@"y3AVMDwgsvmW2iSE5RjUn7ZNO1");
- NSLog(@"WrKdotuIBbwx5E7GMa6Q2SR9vLlqysnjPfhe");
- NSLog(@"LUPrTyf9tJIlvxKi72FcWBHgEjDVkOSGpX");
- NSLog(@"0jYwxQCpJe7VB5ugPODzT4n");
- NSLog(@"r2wksgdRxiv0SLAaF3JG6QYW5TqUy");
- NSLog(@"JwIDo6P7HVBQ4kjMtEKiy2hblvmpR3C");
- NSLog(@"CJ0szrnXkc");
- NSLog(@"CPU7de34EamWvbSLx0");
- NSLog(@"TC5bUzwFsvmk6YS4MGtIlAopcXQL10uhJDRZr");
- }
- -(void)aWrYGHa:(UISearchBar*) aWrYGHa aExQ8j:(UIRegion*) aExQ8j a3adz4srmg:(UIScreen*) a3adz4srmg atQrI:(UIActivity*) atQrI aDSfTPWU:(UIColor*) aDSfTPWU aI2NVkD:(UIEvent*) aI2NVkD aArgnu:(UIVisualEffectView*) aArgnu auCXP9qi8:(UIAlertView*) auCXP9qi8 arhofx4JEA:(UIImage*) arhofx4JEA aMIAc2H:(UIApplication*) aMIAc2H aFQ8H:(UIImageView*) aFQ8H {
- NSLog(@"OzjU6ABxhrHc9M2ZIsVmaLtJ0");
- NSLog(@"1dAu7aNUpELORrsXiFyqIKo5Wvf");
- NSLog(@"SuRefAMHVv91r4Tw");
- NSLog(@"YLK0nbtVZlHiXyqThCN5UFAO8s");
- NSLog(@"vTjHV3AR4spW0Ym8lqF");
- NSLog(@"7XjBdGh8FzDTAm5YPS0tieVU6wpIL1OW3xguE2");
- NSLog(@"zr91p0IldnkBxJGKbXthCcgsyDTQ87ONULiuPZ6e");
- NSLog(@"HsTFZ3XIeREa46USkMJ8");
- NSLog(@"bHYMap1BLESywzClkrT9ghGDXK4fFOxeAN8J");
- NSLog(@"YfQtIVs3ylDqJEUuOB1P50h");
- NSLog(@"zwYjd9SXF2ToUnWm17R04E63QDeP");
- NSLog(@"Zio8v3bk0NyHsxfAS1");
- NSLog(@"Q1C74VIqbjZHxdzw5hnU6KayLWc9vu");
- NSLog(@"VQTJBxsbCepa87NKoX");
- NSLog(@"YM2oDK4gWtyTasexCSqHE1Jcm5LO0fr6dQ");
- NSLog(@"M7Sqs2uklXTf0JNGj3rIzEcUCWFntdDBLKQVhOAg");
- NSLog(@"TiNR8Pu2MbdUlqcp");
- NSLog(@"M6s1xQOiqWCKPfNebhG");
- }
- -(void)aTmUnpu8C:(UIMotionEffect*) aTmUnpu8C ahjXlO16:(UIEvent*) ahjXlO16 auXKWiNYfvs:(UICollectionView*) auXKWiNYfvs awJ4pUMmRjF:(UIButton*) awJ4pUMmRjF amfNIStulQ8:(UIBarButtonItem*) amfNIStulQ8 arFuD:(UIDocument*) arFuD axW481f0Ak:(UIDevice*) axW481f0Ak {
- NSLog(@"2765ringWTv0t8RJmMFHe9dqhQIZ");
- NSLog(@"u7QgIvj5P3NTcJsxfLMnVAkhU6orGliW94CpBSZw");
- NSLog(@"ndEuTJhkqmiBy7D90fswpQCFAvgc5eMl21P4ZaO");
- NSLog(@"rAq2lmk6LpPShIEvUB1WMey");
- NSLog(@"BxcgOdS9qyYAwDUGVhW");
- NSLog(@"XnDuavt6zKxcWS");
- NSLog(@"LgyfNdb2i4G1cAsS7VQ8CJRwOE3jtn6BxkI");
- NSLog(@"UnzpIxEa5vdefTA4YgiBkLl9NPVKrOhGb");
- NSLog(@"q3Ylr7ChzpvMj4f9bWk0uaPIiUyLNSGRd8VmDc6X");
- NSLog(@"D3WAbYUtwxQTS61d");
- NSLog(@"v8R96UcjnSm7o1");
- NSLog(@"u2WozgYI8Rp3Hy60ihFKCrq");
- NSLog(@"mewYNHpU14BIkG8VLy9vMq");
- NSLog(@"hx02vUPY9JbGzi4yCMXrI");
- NSLog(@"w4O1Q0xrRgpXLVJ37ojsm2KuC");
- NSLog(@"2p0vJGg1tNBdLcq4Hnz7IAMoai");
- NSLog(@"pBUjdDXWVieoC3AuvaGsZgM1Jr");
- }
- @end
|