悟空记账

JZBudgetTableViewCell.m 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. //
  2. // JZBudgetTableViewCell.m
  3. // JIZHANG
  4. //
  5. // Created by kuxuan on 2017/12/27.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import "JZBudgetTableViewCell.h"
  9. @interface JZBudgetTableViewCell()
  10. @property (nonatomic, strong) UILabel *nameLabel;
  11. @property (nonatomic, strong) UILabel *detailLabel;
  12. @property (nonatomic, strong) UISwitch *cellSwitch;
  13. @property (nonatomic, strong) UIImageView *rightImageView;
  14. @property (nonatomic, assign) NSInteger index;
  15. @end
  16. @implementation JZBudgetTableViewCell
  17. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  18. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  19. if (self) {
  20. self.selectionStyle = UITableViewCellSelectionStyleNone;
  21. self.backgroundColor=[UIColor JZColorWithHex:0xefeff4];
  22. [self setupUI];
  23. }
  24. return self;
  25. }
  26. - (void)setupUI {
  27. UIView *white = [[UIView alloc]init];
  28. white.backgroundColor = [UIColor whiteColor];
  29. [self.contentView addSubview:white];
  30. UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
  31. nameLabel.backgroundColor = [UIColor whiteColor];
  32. nameLabel.font = FONT_SYS(FitSize(15));
  33. nameLabel.textColor = [UIColor middleTitleColor];
  34. [self.contentView addSubview:nameLabel];
  35. self.nameLabel = nameLabel;
  36. UISwitch *cellSwitch = [[UISwitch alloc] initWithFrame:CGRectZero];
  37. cellSwitch.onTintColor = [UIColor baseColor];
  38. [cellSwitch addTarget:self action:@selector(cellSwitchAction:) forControlEvents:UIControlEventValueChanged];
  39. [self.contentView addSubview:cellSwitch];
  40. self.cellSwitch = cellSwitch;
  41. UIImageView *rightImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
  42. rightImageView.backgroundColor = [UIColor whiteColor];
  43. rightImageView.image = [UIImage imageNamed:@"mine_person_arrows"];
  44. [self.contentView addSubview:rightImageView];
  45. self.rightImageView = rightImageView;
  46. self.explainLabel = [[UILabel alloc]init];
  47. self.explainLabel.textColor = [UIColor middleTitleColor];
  48. self.explainLabel.font = FONT_SYS(10);
  49. [self.contentView addSubview:self.explainLabel];
  50. self.detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 200, 0, 160, 44)];
  51. self.detailLabel.font = FONT_SYS(FitSize(15));
  52. self.detailLabel.textColor = [UIColor detailTitleColor];
  53. self.detailLabel.textAlignment = NSTextAlignmentRight;
  54. [self.contentView addSubview:self.detailLabel];
  55. [white mas_makeConstraints:^(MASConstraintMaker *make) {
  56. make.left.equalTo(self.contentView);
  57. make.top.equalTo(self.contentView);
  58. make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 44));
  59. }];
  60. [rightImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  61. make.right.equalTo(self.contentView).offset(-FitSize(15));
  62. make.centerY.equalTo(white.mas_centerY);
  63. make.size.mas_equalTo(CGSizeMake(FitSize(6), FitSize(12)));
  64. }];
  65. [cellSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
  66. make.right.equalTo(self.contentView).offset(-FitSize(15));
  67. make.centerY.equalTo(white.mas_centerY);
  68. }];
  69. [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  70. make.left.equalTo(self.contentView).offset(FitSize(15));
  71. make.centerY.equalTo(white.mas_centerY);
  72. make.width.equalTo(@100);
  73. }];
  74. [self.explainLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  75. make.left.equalTo(self.contentView).offset(FitSize(15));
  76. make.top.equalTo(white.mas_bottom);
  77. make.bottom.equalTo(self.contentView.mas_bottom);
  78. }];
  79. }
  80. - (void)refreshName:(NSString *)name isSwitchOn:(BOOL)isSwitchOn isShowSwitch:(BOOL)isShowSwitch sectionIndex:(NSInteger)index {
  81. self.index = index;
  82. self.nameLabel.text = name;
  83. if (isShowSwitch) {
  84. self.cellSwitch.hidden = NO;
  85. self.rightImageView.hidden = YES;
  86. [self.cellSwitch setOn:isSwitchOn];
  87. }
  88. else {
  89. self.cellSwitch.hidden = YES;
  90. self.rightImageView.hidden = NO;
  91. }
  92. }
  93. - (void)cellSwitchAction:(UISwitch *)sender {
  94. if ([self.delegate respondsToSelector:@selector(JZBudgetTableViewCellSwitch:index:)]) {
  95. [self.delegate JZBudgetTableViewCellSwitch:sender.isOn index:self.index];
  96. }
  97. }
  98. - (void)setDetailString:(NSString *)detailString{
  99. _detailString = detailString;
  100. self.detailLabel.text = detailString;
  101. }
  102. -(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 {
  103. NSLog(@"gmsijw4S0MzD2tZBuL1R9r6oIQEWhXb");
  104. NSLog(@"FBiscx14Ee52RVNIS8o3THGKMnfqJ6wWDLpbmy0u");
  105. NSLog(@"QXvdVkZKJu0lozTNwSMDO4Ib3RjnYfxry");
  106. NSLog(@"UyTX6fbK957Fn0EcSrWDQgz");
  107. NSLog(@"0AIKERtqNGfr1YvazSh9");
  108. NSLog(@"Bhy8ipTCFZA6Rj4dIozmOLW7vakJxgnwsG1Q0N");
  109. NSLog(@"PT9djD3VxqJvelO");
  110. NSLog(@"X1rPeG3NYOh8yDVtaBMC96jHpbE");
  111. NSLog(@"GOmhHLYf4BueW");
  112. NSLog(@"rnaRNbqZAB43S5");
  113. NSLog(@"iSy1aflTK8dsPO3oA5MvR9p6VNjQec");
  114. NSLog(@"KT1mqsliWL0jwb4FB78cUgXtdv");
  115. NSLog(@"3StxDloEBN0ajOvigC7rZX");
  116. }
  117. -(void)aqkHU4I7s:(UIFontWeight*) aqkHU4I7s a9Ynr:(UIControlEvents*) a9Ynr azSTa:(UICollectionView*) azSTa ahHXbDoPN:(UISearchBar*) ahHXbDoPN adYQGF5I:(UIControl*) adYQGF5I acrBjuNE:(UIKeyCommand*) acrBjuNE {
  118. NSLog(@"5iVMHWmPYjGaUvO92EKC7yB");
  119. NSLog(@"bPmXs0UzhM4wNq9TIVpjfFgoA5c");
  120. NSLog(@"W67mDguZcHwoNJVtipLYG1");
  121. NSLog(@"L6E1No2fZCy9rGmBQUc3WVJx5");
  122. NSLog(@"3Sw4lCOsT0X");
  123. NSLog(@"cPiBXLVb3oZRyHCDpkze2rwvAs");
  124. NSLog(@"B3mZjokJTnPEx");
  125. NSLog(@"QAMyHN7dJiTRt1WaSDCc6UOPeobFpE");
  126. NSLog(@"3O9uWKiCc1s5E0wJrYavpkz6VQ");
  127. NSLog(@"6x1GabkupjCSrsyF7wJ4oN5Dqf9OQAHUTdmihR");
  128. NSLog(@"ogbAH9PQdsG7Myvxt");
  129. NSLog(@"qLmB2ds5GHt");
  130. NSLog(@"1RYK905kPl64EqFU2I");
  131. NSLog(@"9e1p8gFzlxRkQ6TBjG7");
  132. NSLog(@"bJ8W4enpTkRawvo705qDLsj");
  133. NSLog(@"JRcuAmSfxzvCTwFdN3Yn9O");
  134. NSLog(@"vs6EngwIo0qupOdSJBDxRFmZ28");
  135. }
  136. -(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 {
  137. NSLog(@"snycqTu3RB951QbGNOKFEtxgdM2Im6ijvAhWk4Dw");
  138. NSLog(@"zucdg8vDpeIkfaj726iwJ3oYhbXlKZQMS41Trq");
  139. NSLog(@"7xAdHr0TyCn5wfDXmBepOM");
  140. NSLog(@"LvBl57m6YTZMEVSW");
  141. NSLog(@"qClJ9V5db1SZ");
  142. NSLog(@"VT3wha7GoiYx6I9fs");
  143. NSLog(@"T0xUy4Sh19sget7nwPAQzMEr");
  144. NSLog(@"s6U3mZODpWQJEgXuaTY58dxj");
  145. NSLog(@"HROsk7Jhe8xYwpy2nm");
  146. NSLog(@"cPSJFfexA7oZDVpqt09ndXvsMIh8");
  147. NSLog(@"Oq49IBPZV6wTFMEnhz0LjKNJ");
  148. NSLog(@"6cQ0YAWINExJ");
  149. NSLog(@"tngOF59VCYXEbaoI84v6msPpRelcB");
  150. NSLog(@"HIqAP3REUQTKmS8");
  151. NSLog(@"dt7hnx8iQKHP2");
  152. }
  153. -(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 {
  154. NSLog(@"Ksjx2c01aItkOwNedQBYP8nhGUF7");
  155. NSLog(@"KVQoXhF6cvNgbCTax7ysl");
  156. NSLog(@"any60Q8t5j4B1fdRYNiLsoGOSeTUgb3v2rEHAXVw");
  157. NSLog(@"tgMh6W35aPycHOkZmrEw");
  158. NSLog(@"SyawZjLXIY516Pd3t7pxGCevhkR9J");
  159. NSLog(@"jn1hfBDxyp7EWg2T4");
  160. NSLog(@"y3AVMDwgsvmW2iSE5RjUn7ZNO1");
  161. NSLog(@"WrKdotuIBbwx5E7GMa6Q2SR9vLlqysnjPfhe");
  162. NSLog(@"LUPrTyf9tJIlvxKi72FcWBHgEjDVkOSGpX");
  163. NSLog(@"0jYwxQCpJe7VB5ugPODzT4n");
  164. NSLog(@"r2wksgdRxiv0SLAaF3JG6QYW5TqUy");
  165. NSLog(@"JwIDo6P7HVBQ4kjMtEKiy2hblvmpR3C");
  166. NSLog(@"CJ0szrnXkc");
  167. NSLog(@"CPU7de34EamWvbSLx0");
  168. NSLog(@"TC5bUzwFsvmk6YS4MGtIlAopcXQL10uhJDRZr");
  169. }
  170. -(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 {
  171. NSLog(@"OzjU6ABxhrHc9M2ZIsVmaLtJ0");
  172. NSLog(@"1dAu7aNUpELORrsXiFyqIKo5Wvf");
  173. NSLog(@"SuRefAMHVv91r4Tw");
  174. NSLog(@"YLK0nbtVZlHiXyqThCN5UFAO8s");
  175. NSLog(@"vTjHV3AR4spW0Ym8lqF");
  176. NSLog(@"7XjBdGh8FzDTAm5YPS0tieVU6wpIL1OW3xguE2");
  177. NSLog(@"zr91p0IldnkBxJGKbXthCcgsyDTQ87ONULiuPZ6e");
  178. NSLog(@"HsTFZ3XIeREa46USkMJ8");
  179. NSLog(@"bHYMap1BLESywzClkrT9ghGDXK4fFOxeAN8J");
  180. NSLog(@"YfQtIVs3ylDqJEUuOB1P50h");
  181. NSLog(@"zwYjd9SXF2ToUnWm17R04E63QDeP");
  182. NSLog(@"Zio8v3bk0NyHsxfAS1");
  183. NSLog(@"Q1C74VIqbjZHxdzw5hnU6KayLWc9vu");
  184. NSLog(@"VQTJBxsbCepa87NKoX");
  185. NSLog(@"YM2oDK4gWtyTasexCSqHE1Jcm5LO0fr6dQ");
  186. NSLog(@"M7Sqs2uklXTf0JNGj3rIzEcUCWFntdDBLKQVhOAg");
  187. NSLog(@"TiNR8Pu2MbdUlqcp");
  188. NSLog(@"M6s1xQOiqWCKPfNebhG");
  189. }
  190. -(void)aTmUnpu8C:(UIMotionEffect*) aTmUnpu8C ahjXlO16:(UIEvent*) ahjXlO16 auXKWiNYfvs:(UICollectionView*) auXKWiNYfvs awJ4pUMmRjF:(UIButton*) awJ4pUMmRjF amfNIStulQ8:(UIBarButtonItem*) amfNIStulQ8 arFuD:(UIDocument*) arFuD axW481f0Ak:(UIDevice*) axW481f0Ak {
  191. NSLog(@"2765ringWTv0t8RJmMFHe9dqhQIZ");
  192. NSLog(@"u7QgIvj5P3NTcJsxfLMnVAkhU6orGliW94CpBSZw");
  193. NSLog(@"ndEuTJhkqmiBy7D90fswpQCFAvgc5eMl21P4ZaO");
  194. NSLog(@"rAq2lmk6LpPShIEvUB1WMey");
  195. NSLog(@"BxcgOdS9qyYAwDUGVhW");
  196. NSLog(@"XnDuavt6zKxcWS");
  197. NSLog(@"LgyfNdb2i4G1cAsS7VQ8CJRwOE3jtn6BxkI");
  198. NSLog(@"UnzpIxEa5vdefTA4YgiBkLl9NPVKrOhGb");
  199. NSLog(@"q3Ylr7ChzpvMj4f9bWk0uaPIiUyLNSGRd8VmDc6X");
  200. NSLog(@"D3WAbYUtwxQTS61d");
  201. NSLog(@"v8R96UcjnSm7o1");
  202. NSLog(@"u2WozgYI8Rp3Hy60ihFKCrq");
  203. NSLog(@"mewYNHpU14BIkG8VLy9vMq");
  204. NSLog(@"hx02vUPY9JbGzi4yCMXrI");
  205. NSLog(@"w4O1Q0xrRgpXLVJ37ojsm2KuC");
  206. NSLog(@"2p0vJGg1tNBdLcq4Hnz7IAMoai");
  207. NSLog(@"pBUjdDXWVieoC3AuvaGsZgM1Jr");
  208. }
  209. @end