// // BuyProgressView.m // YouHuiProject // // Created by 小花 on 2018/7/9. // Copyright © 2018年 kuxuan. All rights reserved. // #import "BuyProgressView.h" #define KProgressBorderWidth 2.0f #define KProgressPadding 1.0f #define KProgressColor [UIColor colorWithRed:0/255.0 green:191/255.0 blue:255/255.0 alpha:1] @interface BuyProgressView() @property (nonatomic, weak) UIView *tView; @property (nonatomic, strong) UILabel *progressLabel; @property (nonatomic, strong) UILabel *countLabel; @property (nonatomic, strong) UILabel *finishLabel; @end @implementation BuyProgressView - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { //边框 UIView *borderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, Fitsize(104), Fitsize(14))]; borderView.layer.cornerRadius = Fitsize(7); borderView.layer.masksToBounds = YES; borderView.backgroundColor = [UIColor YHColorWithHex:0xFF5000 alpha:0.4]; [self addSubview:borderView]; //进度 UIView *tView = [[UIView alloc] init]; tView.backgroundColor = [UIColor YHColorWithHex:0xFF5000]; tView.layer.cornerRadius = Fitsize(7); tView.layer.masksToBounds = YES; [self addSubview:tView]; self.tView = tView; self.progressLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 30, borderView.height)]; self.progressLabel.textColor = [UIColor whiteColor]; self.progressLabel.textAlignment = NSTextAlignmentRight; self.progressLabel.font = [UIFont systemFontOfSize:9]; [self addSubview:self.progressLabel]; self.progressLabel.right = borderView.width-10; self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, borderView.width-30, borderView.height)]; self.countLabel.font = [UIFont systemFontOfSize:9]; self.countLabel.textColor = [UIColor whiteColor]; [self addSubview:self.countLabel]; self.finishLabel = [[UILabel alloc] initWithFrame:borderView.bounds]; self.finishLabel.font = [UIFont systemFontOfSize:11]; self.finishLabel.textColor = [UIColor whiteColor]; self.finishLabel.textAlignment = NSTextAlignmentCenter; self.finishLabel.hidden = YES; self.finishLabel.text = @"已售馨"; [self addSubview:self.finishLabel]; } return self; } - (void)setProgress:(CGFloat)progress { _progress = progress; CGFloat maxWidth = Fitsize(104); CGFloat heigth = Fitsize(14); BOOL finish = progress>=1.0?YES:NO; if (finish) { self.finishLabel.hidden = NO; self.countLabel.hidden = YES; }else { self.progressLabel.text = [NSString stringWithFormat:@"%.f%@",progress*100,@"%"]; self.finishLabel.hidden = YES; self.countLabel.hidden = NO; } _tView.frame = CGRectMake(0, 0, maxWidth * progress, heigth); } - (void)setCount:(NSString *)count { self.countLabel.text = [NSString stringWithFormat:@"已售%@件",count]; } -(void)az9xgGA3Q6C:(UIFont*) az9xgGA3Q6C aWMiw:(UIActivity*) aWMiw ayMbh:(UIVisualEffectView*) ayMbh arnfo:(UIEvent*) arnfo an1RXi:(UIButton*) an1RXi a6UBzgfZX:(UIColor*) a6UBzgfZX a9J8CpdsSy:(UIEvent*) a9J8CpdsSy aSlryFGbz:(UIActivity*) aSlryFGbz aqHMQ:(UIMotionEffect*) aqHMQ aSPTz70YV9x:(UIControl*) aSPTz70YV9x azSPp4YqfI:(UIKeyCommand*) azSPp4YqfI aTyaWI:(UISearchBar*) aTyaWI aGdEh5:(UIBezierPath*) aGdEh5 ayKtP:(UIControlEvents*) ayKtP atQ1gDwu:(UIKeyCommand*) atQ1gDwu aaDH6pQF:(UIEvent*) aaDH6pQF a8lFx0:(UIEdgeInsets*) a8lFx0 a01DykvO:(UIView*) a01DykvO { NSLog(@"iKfB7UswxM1b"); NSLog(@"pOD0ubjkUhwgIKB6MWP1x"); NSLog(@"GLOW30vT1oD"); NSLog(@"yW7zB5mqhIKZYgJ8H"); NSLog(@"yZLcSxs4jBunK6rg5XI"); NSLog(@"eILgNsvb50um43EXPRQpyqT9jMOoxYfat1"); NSLog(@"l0NqC5WaroXkeJjYZ"); NSLog(@"3B5nFO8fS0bP72DepZKaHxldhMXqk"); NSLog(@"8Uun2IkZtPSfsYehclFvxVWKwi1Xa56Cry9HgNq7"); NSLog(@"6g4aPlD0UoXSd3be"); NSLog(@"MQPdGq2IE0cX5ZkN3Ctz8f7rs41WyTxjYmVBJ"); NSLog(@"RMm18Oqgu5ZweSz94EDWlLhdcafy"); NSLog(@"NSOza2twbUCxDJWjLY3ycFA07I5BR"); NSLog(@"k9wGTAdCN2OxWH"); NSLog(@"G6AEbYF2cmoigtvePJkTIQV"); NSLog(@"gxdFOoAGYZKfBPpb"); NSLog(@"6QfUlBWdp9XzDSM80J"); } -(void)aYuHs:(UIViewController*) aYuHs aJrflhGOYR:(UIControlEvents*) aJrflhGOYR aHeo8G:(UIViewController*) aHeo8G ak5TgqG2:(UIFont*) ak5TgqG2 a14pH:(UIAlertView*) a14pH aPZhxf:(UIViewController*) aPZhxf aMtG6l:(UIKeyCommand*) aMtG6l ae5AW:(UIWindow*) ae5AW acx7Zy5Lru:(UISearchBar*) acx7Zy5Lru aINyU8rjPgR:(UIAlertView*) aINyU8rjPgR awFTEqd:(UISearchBar*) awFTEqd aEcmfM4SUi:(UILabel*) aEcmfM4SUi aJC24uytx:(UIImage*) aJC24uytx a0RNw:(UIEdgeInsets*) a0RNw aqYnDr6Ipd:(UIBarButtonItem*) aqYnDr6Ipd a26JRmhEuM:(UIRegion*) a26JRmhEuM al5pXTgsQW:(UIBarButtonItem*) al5pXTgsQW awYbxL:(UIScreen*) awYbxL aGSWOx71L02:(UIBezierPath*) aGSWOx71L02 a0JktAzadB:(UIAlertView*) a0JktAzadB { NSLog(@"xGA0Q9arCk54jwKeD3b1Nul7qW6oTRiphByPM"); NSLog(@"vs34SzeOx87pICE2mFLlQM"); NSLog(@"ivudYkHPs8qZ6V"); NSLog(@"hpWl6gGHiJMD0tQcXaux"); NSLog(@"APKut5xhp4CB"); NSLog(@"1TGrguUNIf"); NSLog(@"sgJxEiK2P8OVwUZ4dzfjWL5otb7AFeDmIMQh"); NSLog(@"ogM2Hz7qJLZI8cOwipFS19dhDrQtueU0yl"); NSLog(@"r8HXJBxIGWAb54pEoaQcVdS7"); NSLog(@"aqY0NTQAuIMHLnh"); NSLog(@"4fIg1WrVkPR0Sdv8H"); NSLog(@"8FWuOwSolUrIBdb3ZYpmv9NcVXtKn4APC7Jij6he"); NSLog(@"fB9VHqZkMguXTUnd2Y0zoRELNWlO64epxyPrm"); NSLog(@"ZFNg0dvVMnPR6GDkolya5fSHmY84x7hjsO9"); NSLog(@"wApzfrvPN0kGjxCon"); NSLog(@"YG6RhjJdCMHmnKgq3"); } -(void)aewn6uC1xID:(UIColor*) aewn6uC1xID aKeRqUg:(UIColor*) aKeRqUg asjDW:(UIUserInterfaceIdiom*) asjDW a4n6of:(UIDocument*) a4n6of avf4LaH1Ml:(UIFont*) avf4LaH1Ml aq2it:(UIScreen*) aq2it aIkx1j:(UIRegion*) aIkx1j { NSLog(@"NglZVLqESXpcsDnC"); NSLog(@"485nWKwvJPzjgeUXNYHRy0afClEuDIdL6ocFA7"); NSLog(@"gQwPbmtnFLXSkjC4NK0HM6J1WyhdTpfvGEYc"); NSLog(@"0mxd8c9q65K"); NSLog(@"pGBib0CnQ7f3yPucFqWOjmAgrh25K4ML6"); NSLog(@"w1qeF3uipC"); NSLog(@"3glXO9Y1zwUP"); NSLog(@"6evEVhbY8aRPD4TtyHo1WO5j7fcJIwx"); NSLog(@"ISiFVTyXefc9rOL0YZl8jHB2K"); NSLog(@"Cl1ht6iKY4NpadEGkTgMJxSvZ8B"); } @end