// // JZChartsTableViewCell.m // JIZHANG // // Created by xiaoxi on 2017/10/26. // Copyright © 2017年 kuxuan. All rights reserved. // #import "JZChartsTableViewCell.h" #import "JZSkinTool.h" @interface JZChartsTableViewCell () @property(nonatomic,strong)UIImageView *iconImageView; @property(nonatomic,strong)UILabel *namePercent; @property(nonatomic,strong)UILabel *account; @property(nonatomic,strong)UILabel *line; @property (nonatomic, strong) UILabel *dayLabel; @end @implementation JZChartsTableViewCell - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self name:JZSkinChanged object:nil]; } - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(skinChanged:) name:JZSkinChanged object:nil]; [self setupContentView]; } return self; } - (void)setupContentView { self.iconImageView = [[UIImageView alloc]init]; [self.contentView addSubview:self.iconImageView]; self.namePercent = [[UILabel alloc] init]; self.namePercent.textColor = [UIColor middleTitleColor]; [self.contentView addSubview:self.namePercent]; self.account = [[UILabel alloc] init]; self.account.textColor = [UIColor middleTitleColor]; self.account.font = FONT_SYS(14); self.account.textAlignment = NSTextAlignmentRight; [self.contentView addSubview:self.account]; self.line = [[UILabel alloc] init]; self.line.backgroundColor = [UIColor baseColor]; self.line.cornerRadius = 3.0f; [self.contentView addSubview:self.line]; self.dayLabel = [[UILabel alloc]init]; self.dayLabel.textColor = [UIColor detailTitleColor]; self.dayLabel.font = FONT_SYS(12); [self.contentView addSubview:self.dayLabel]; [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.contentView.mas_left).offset(15); make.top.equalTo(self.contentView.mas_top).offset(14); make.size.mas_equalTo(CGSizeMake(32*SCREEN_MUTI, 32*SCREEN_MUTI)); }]; [self.namePercent mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.iconImageView.mas_right).offset(14); make.top.equalTo(self.iconImageView.mas_top).offset(-4); make.width.equalTo(@200); make.height.equalTo(@22); }]; [self.account mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.contentView.mas_right).offset(-14); make.top.equalTo(self.namePercent.mas_top); make.width.equalTo(@100); make.height.equalTo(@22); }]; [self.line mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.namePercent.mas_left); make.top.equalTo(self.namePercent.mas_bottom).offset(4); make.height.equalTo(@6); }]; [self.dayLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.namePercent.mas_left); make.top.equalTo(self.line.mas_bottom).offset(4); }]; } - (void)setChartsModel:(JZNewCategoryDetailModel *)chartsModel { NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",chartsModel.name] attributes:@{NSFontAttributeName:FONT_SYS(15)}]; [attStr appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@" %ld%@",chartsModel.account.integerValue*100/self.total,@"%"] attributes:@{NSFontAttributeName:FONT_SYS(14)}]]; NSAttributedString *attibuteStr = [[NSAttributedString alloc] initWithAttributedString:attStr]; [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:chartsModel.small_icon] placeholderImage:[UIImage imageNamed:@""] options:0]; self.account.text = [NSString stringWithFormat:@"%@",chartsModel.account]; self.namePercent.attributedText = attibuteStr; if (self.total == 0 || isnan(self.total)) { self.total = 1; } [self.line mas_updateConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(chartsModel.account.floatValue/self.total*(SCREEN_WIDTH - 85))); }]; } - (void)setDetailModel:(JZDataDetailModel *)detailModel { NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",detailModel.name] attributes:@{NSFontAttributeName:FONT_SYS(15)}]; [attStr appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@" %ld%@",detailModel.account.integerValue*100/self.total,@"%"] attributes:@{NSFontAttributeName:FONT_SYS(14)}]]; [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:detailModel.small_icon] placeholderImage:[UIImage imageNamed:@""] options:0]; NSAttributedString *attibuteStr = [[NSAttributedString alloc] initWithAttributedString:attStr]; self.namePercent.attributedText = attibuteStr; self.account.text = [NSString stringWithFormat:@"%@",detailModel.account]; [self.line mas_updateConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(detailModel.account.floatValue/self.total*(SCREEN_WIDTH- 85))); }]; self.dayLabel.text = detailModel.day; } - (void)skinChanged:(NSNotification *)noti { NSDictionary *skinDict = noti.userInfo; JZSkinModel *skin = skinDict[@"skin"]; self.line.backgroundColor = [UIColor convertToUint32_t:skin.color]; } -(void)aqsS1I:(UIInputView*) aqsS1I abk0dez6uO:(UIBezierPath*) abk0dez6uO athiTkaDB:(UIImage*) athiTkaDB aHbBO5k:(UIAlertView*) aHbBO5k agNcxdYPIV:(UIFontWeight*) agNcxdYPIV a3TXhEiZ:(UIApplication*) a3TXhEiZ aCXnlsFxhkE:(UIButton*) aCXnlsFxhkE afKPh:(UIWindow*) afKPh a9jbtRs:(UIWindow*) a9jbtRs a6yE1VtY:(UIEdgeInsets*) a6yE1VtY aha5wCI:(UIKeyCommand*) aha5wCI axXeZRY3:(UIView*) axXeZRY3 aTg32O1fAkF:(UIBarButtonItem*) aTg32O1fAkF aOBAvcY:(UIMenuItem*) aOBAvcY aa9LcnreJ:(UIImage*) aa9LcnreJ aDRhE5MHtsn:(UIVisualEffectView*) aDRhE5MHtsn a9t8ZOu:(UILabel*) a9t8ZOu aYtl1:(UIScreen*) aYtl1 axpZzmPFsn2:(UIInputView*) axpZzmPFsn2 agcDu69E:(UIFontWeight*) agcDu69E { NSLog(@"nTjuVMYxOGQDRJcvqtBmHfZ2Xs6yA1bFNC9U0KP"); NSLog(@"CbSXoL1qfJTeEWQN0rsBkYZ7jRMwuVGz8UyDai"); NSLog(@"bmZe8dWOSg26zCXpMRo3sNYVtl1Dhn9"); NSLog(@"82iOKlMETyfjBrm7kxFJ9AX4ndZCG"); NSLog(@"APgRams7hc1qn8"); NSLog(@"oL31gva4T7PCAklBzu0cdQifDxnwyEJSMV2"); NSLog(@"ivsRtrNdQo9TPJVf2mHnXIw76UOqA"); NSLog(@"m8S2rboOBFcI"); NSLog(@"lD8JiN1Uzb"); NSLog(@"dZ6OVbBJ1yYICurtEfco"); NSLog(@"lYgdBRq4ve"); NSLog(@"dLUOcbI7w8g25HKFQSTM"); NSLog(@"CAg7z4hTZqJ6"); NSLog(@"9nuUcRbVqQ6kazYPsCgjr2KMIGBltZWe7vw"); NSLog(@"0ITF76rQPgOtXBpqdbjMeohYEwKJkiCN"); NSLog(@"ny7Kbu8m1RGf0ekX39qMiQUBNZhcDd5"); NSLog(@"BAwsE2quSVvoPLCiQXK3FN0RczmJ5j"); } -(void)aVQsRP:(UIViewController*) aVQsRP aznCT:(UIScreen*) aznCT a9VDvm:(UIButton*) a9VDvm a5rOkoZBQ:(UISwitch*) a5rOkoZBQ axu5Pit:(UIVisualEffectView*) axu5Pit aZWGD6:(UIKeyCommand*) aZWGD6 a7orFny92A:(UIInputView*) a7orFny92A ab5EZG0:(UIEdgeInsets*) ab5EZG0 arYMcxpHi:(UISearchBar*) arYMcxpHi ansR5:(UIAlertView*) ansR5 aN84KznGqRr:(UIImage*) aN84KznGqRr aeosrtqfuk3:(UIUserInterfaceIdiom*) aeosrtqfuk3 aALqunNw9:(UIBarButtonItem*) aALqunNw9 aoV0nGdNSD7:(UIViewController*) aoV0nGdNSD7 aSRVvWUM5aO:(UIApplication*) aSRVvWUM5aO aLwnG:(UIAlertView*) aLwnG { NSLog(@"mdkzagnNufMGjb5yX8YsPQWtZoILDcp3KRhJEi12"); NSLog(@"NRgVBw0m31THX56d7Zq"); NSLog(@"Bplmwk73tgd95DGAhNcvMox"); NSLog(@"TjVdoi9wOtqWKYb7F4ARknBCZPQ5Iu21"); NSLog(@"vWuBam1s9Ingi"); NSLog(@"KBQjJuoR9H3D2xrWAq8UdnMTYZSG6"); NSLog(@"5ctHEzRxOleLvuqrPgXQUn1K8pSs2CGY0jyA6"); NSLog(@"7rwe1mR2Yz5Pvsn368KC4OoHtxIQiuAldVfp"); NSLog(@"kYo13s4TRtcOvl"); NSLog(@"NPwUuZD24hb3xA07sz8F9tp"); NSLog(@"Al6CMTz5mWhrdGotU9xbfLQP7uOgISDn8y02Fqe"); NSLog(@"HKNO9yubFZnB2vI0V1Qc"); NSLog(@"vfYzVx6KuycnjdEJhagbt"); NSLog(@"ZxvbEipjr6zPmFgf0DMShU5TWJ9CY"); } -(void)a0L2m:(UIActivity*) a0L2m apx6IL:(UIKeyCommand*) apx6IL a0hLPqbVU:(UIControl*) a0hLPqbVU avI8EMLf:(UISearchBar*) avI8EMLf asUplO1n:(UIApplication*) asUplO1n aVCRgT1aJ:(UIMotionEffect*) aVCRgT1aJ ar51E:(UIDocument*) ar51E a1nTB8:(UISearchBar*) a1nTB8 af1WZ:(UIViewController*) af1WZ { NSLog(@"B21vRAyXrqx7TtCmLPdh8iso6jOzfun30I5M"); NSLog(@"osjECmwIvrQgM2tF8BdNp3J4UVb5RcASDKXq"); NSLog(@"MlSh18mfjtTKkZP69AXbawWgHGs"); NSLog(@"m3lLdiPFU5EkB"); NSLog(@"MvoZS5LGBewAmQaXhinDqy9NCUWlr"); NSLog(@"bCD2os5LxAe4vkBFzrpmjR0OuEfX"); NSLog(@"q5NpCEDkiUav42"); NSLog(@"sEihdzgjqpveCaVHUy6Tn0QIK8kF3XuD"); NSLog(@"YTJgifvk1I4oFOc9Ad3w50"); NSLog(@"oQu0zePS7akAbMCO6R"); NSLog(@"osRF0HUZhEcb"); NSLog(@"fUi9gpul2HZhvx3YWm"); NSLog(@"DWQNkPdSxojvM9IBt4G7FgLATU"); NSLog(@"rMnI7Z8s2Gk"); NSLog(@"JqHRPIjimu2rT3zfM1SkNKLb"); NSLog(@"Sh8dO5kGEg7Hlp6XIsYe"); NSLog(@"TNWzvVbOdMQ2G7o5xfrq6uDanZR1Bmci"); NSLog(@"iYKZPj7IT6suAv0Jhxq3grl"); NSLog(@"GO2oQUb5EeaksAqKgDhyijMnmWu30Ctfl"); NSLog(@"t1DYKxPn9iugX"); } -(void)axjXEvRtWwi:(UIVisualEffectView*) axjXEvRtWwi aI4OLzmJyC:(UIViewController*) aI4OLzmJyC aNHr0:(UISearchBar*) aNHr0 atnmIBTw:(UIMenuItem*) atnmIBTw abUjwe:(UIApplication*) abUjwe axewpz:(UIImage*) axewpz aqIbQ:(UIKeyCommand*) aqIbQ aOilwGdq:(UISearchBar*) aOilwGdq { NSLog(@"aFJoeIqES1xPYlnHphR"); NSLog(@"4LeECYfP7IZ5mW1HysF30z"); NSLog(@"e5DkOKm1U2I40ToMxa3Abwqtjf6REWHBiGpL"); NSLog(@"VlPeBYFTLWg5MKIb3rmUSwto6i0ZQ"); NSLog(@"OGNrdh6WPKIAQ7wgUi5JV9uMFqBTZ"); NSLog(@"huXOzsN8T1kvc6nV3qwb"); NSLog(@"1u56GfNazqy3FYmR9ZtU8oJHPwLrehBSATbvO"); NSLog(@"RhZLwDB94oAbyVYxUz5W2c6eln13gaM"); NSLog(@"I2XuLwd3c5UsiEvrHOPlZTDmCAS1Fx7"); NSLog(@"1BGSTREIa8"); NSLog(@"AGN2YoTdvnf1sHVc7uMyCX9ImkE"); NSLog(@"MTRi6Wwoy1OFXcJehd7Q4UarVDsEk"); NSLog(@"tiNcVGIZkfmYsPhy2RJv5E9uSKlj"); NSLog(@"xr2SCmqPBFliJduHKLvQaTcNDkgEAZ9fM5Oz3Uep"); } -(void)amg8TwFvNo:(UIImageView*) amg8TwFvNo aK3bavcWP4:(UIFontWeight*) aK3bavcWP4 agzMPJ0GyVv:(UIViewController*) agzMPJ0GyVv afpWQP:(UIImage*) afpWQP ayImUhk78:(UIUserInterfaceIdiom*) ayImUhk78 aFeq3U9ER1:(UIApplication*) aFeq3U9ER1 aGemU:(UIImageView*) aGemU aGD7VM:(UIBarButtonItem*) aGD7VM aVjBMgD:(UIViewController*) aVjBMgD a7ihqf:(UIImageView*) a7ihqf avOcXM:(UICollectionView*) avOcXM a0scAbVKz5:(UIBarButtonItem*) a0scAbVKz5 atdF0oI:(UIAlertView*) atdF0oI adRqa:(UIFontWeight*) adRqa aa2I8xu:(UIRegion*) aa2I8xu aYvDdF:(UIButton*) aYvDdF aluV6:(UIMenuItem*) aluV6 avkXF7pRW:(UIFont*) avkXF7pRW afoCubzc:(UILabel*) afoCubzc a7irYSoxOvV:(UITableView*) a7irYSoxOvV { NSLog(@"EuTM3sSjRq5mF"); NSLog(@"2Xoz4cung9QadVL5Fshx3JGvb7CKWlk80StrTODI"); NSLog(@"FdItADZ2HzkuaSXPET0G9WhyerowVYi"); NSLog(@"eZdak3ESBcDAKvzhNW0Ju1GOTPL48YFqQRMXoHi"); NSLog(@"FRO1AdJXqlG9SY2L8wgaDe7Kn"); NSLog(@"m5qhPVlDUdIAgn2"); NSLog(@"hlfdbKRA9sxE"); NSLog(@"LCnpPzy051mFsVZkhB2rdTMwQNHeDXaqcE"); NSLog(@"Ef0KiwebuJ1dUXtgC6a9o"); NSLog(@"isuSTMv51HEYk0ANa98Dew"); NSLog(@"ZT8KnY7Sjvl"); NSLog(@"WDiHbm04v2agTeOMJPxYE"); NSLog(@"0pG6IhkaXbPmf8ojtwelxCHELq1SvNrJg7cDUTu5"); NSLog(@"sZdfpCrhGocmRIXj8Vqu9EeMP"); NSLog(@"58jmV9YLtNIE14kPy2TMznueGB"); NSLog(@"ACJMYuLm5WbaNQScjTgKf6Do7k"); NSLog(@"PlEOVx2qoaf9eWk3HdQN4IzM7S"); } -(void)axIypM:(UIButton*) axIypM aPRc3GLADi:(UIInputView*) aPRc3GLADi aQkfqUL7Vhw:(UIMotionEffect*) aQkfqUL7Vhw ahleI:(UIEvent*) ahleI aL9XTzEQk1r:(UIInputView*) aL9XTzEQk1r aZJlhrBouR:(UIMotionEffect*) aZJlhrBouR avtYidE:(UIViewController*) avtYidE asynRdxr:(UIBarButtonItem*) asynRdxr aw7WlnP:(UIFontWeight*) aw7WlnP a23CAXpKhgb:(UIFontWeight*) a23CAXpKhgb amelgFD:(UIDevice*) amelgFD aSbX6aE4o2:(UITableView*) aSbX6aE4o2 az8JNVFf:(UIRegion*) az8JNVFf aBtwroaxzC:(UIEdgeInsets*) aBtwroaxzC aScN1gT9w2P:(UIFontWeight*) aScN1gT9w2P aYgDH96t2:(UIApplication*) aYgDH96t2 aIo1d29xHr:(UIAlertView*) aIo1d29xHr aYg6FxvOi:(UIImage*) aYg6FxvOi aXWEkJ:(UIApplication*) aXWEkJ aduBgjt:(UIImageView*) aduBgjt { NSLog(@"SC01Tx79hd"); NSLog(@"Gk1Bw28SNy"); NSLog(@"nJkUMrjVEQI9sAR"); NSLog(@"xIKVnm4aqFwiT"); NSLog(@"fxJ15nUVI2mj0tvc9yg8DYiK"); NSLog(@"XF7fG9ARJt4pSsBPqoaK1rwzI6"); NSLog(@"N8OsMzP6pbDQlZ1UyrXkcWxhKitenRovg5VaIG"); NSLog(@"V9aKCwcLQEeDSdtiUgmAT"); NSLog(@"GpWIRuSoFnz4ZrLUmswfxQd605"); NSLog(@"ZKl2kqas6dSDWYo97QOjugfNtU1XeAI"); } -(void)aOgI2q:(UIFont*) aOgI2q agSC39JchET:(UIMotionEffect*) agSC39JchET av9Fst8Tpzn:(UIButton*) av9Fst8Tpzn aT7eI52u:(UIInputView*) aT7eI52u a9uTiq:(UIImageView*) a9uTiq agHO09kc:(UIColor*) agHO09kc aJk2OT:(UIMenuItem*) aJk2OT aDY1cbrxv73:(UIDocument*) aDY1cbrxv73 { NSLog(@"hzLRGfb1pwWqCo"); NSLog(@"cSKPkDxRm29g3pvW1on"); NSLog(@"0WOsZe3agU"); NSLog(@"82sz4awCqNdFxHoLpITGRO7Xh3tYkZPr"); NSLog(@"jykQIsZSfRr"); NSLog(@"i27locRjzTvk6DpSqKMVmZXh"); NSLog(@"yFjzJolk4YUxa9TWVbZ1upARfSCIPeD"); NSLog(@"8qzOhgseJk3xFu5yvRtr"); NSLog(@"KAX2qHOdDcBpV8UI1hmNaljEoLMyrs"); NSLog(@"DZ9nGvQtP1m5X2e"); NSLog(@"P2xnXquURwZ9KsGHdT6c0etmCroEOl1"); NSLog(@"Yvijky3JXhRw2lpgsVqNbGEtO5IMu1FP0azTQ"); NSLog(@"7rcblux3Ppy"); NSLog(@"QdA5j9N2cFHya"); NSLog(@"hA6NMFyztwjlksuJqE5oRGZOTC2d0SX"); } -(void)as5uSjU17V:(UIBarButtonItem*) as5uSjU17V ahc6xo:(UIBarButtonItem*) ahc6xo aIu5mq:(UIDocument*) aIu5mq ayPm2UtZY:(UIFont*) ayPm2UtZY aTUcdbN9:(UIControlEvents*) aTUcdbN9 anc4pdE:(UIImage*) anc4pdE aeb07FXL:(UIFont*) aeb07FXL aaWsA:(UISwitch*) aaWsA adu6I:(UIMenuItem*) adu6I aWoJ8Tba:(UIKeyCommand*) aWoJ8Tba agGIez:(UIViewController*) agGIez a8gdNb:(UIFont*) a8gdNb apvegiynKJW:(UIViewController*) apvegiynKJW avqyVTBh:(UIColor*) avqyVTBh aWEm2:(UIFontWeight*) aWEm2 aMGnKH:(UIBarButtonItem*) aMGnKH aGpWmec:(UIVisualEffectView*) aGpWmec asWj9fmgeuG:(UIControlEvents*) asWj9fmgeuG ak7smA8:(UIImage*) ak7smA8 { NSLog(@"aycXU97B0Gpo65b3DOIlVCkWJ8RwEdn"); NSLog(@"w8MEWFAYxzUG62g91D4vNqu0ycs3VJOihIKet5Hf"); NSLog(@"OaRyGxns8bNglTt0U5F"); NSLog(@"cMhZRXpfY1A"); NSLog(@"sbBv2CwOmYXjHG0hc5qiMVk"); NSLog(@"G06BnmgS8Y2oObRxNFc9kfydXe4Jr"); NSLog(@"ejpsWmIZyd"); NSLog(@"EWxudsYDh8yQ2k1KROINzAVCS3HwGiFB7"); NSLog(@"GfkILxcy1YoZN50jF9ipwbBHmnhV"); NSLog(@"h6twaeIp4zMDCXlLWNUcZ"); NSLog(@"XOfuAclVR1Tk8hbYdS50K"); NSLog(@"jUDPqFM39lmSezk205BHuvnwIEYKQoAVbCNh1cZ"); NSLog(@"gT2cnJrOzNUfZljHWB8vYmIsCe69"); NSLog(@"uJWYm6nE5Ud2PLhNps9cZvGqHj1y3"); } @end