#import <UIKit/UIKit.h>
@interface BaseProgressBar : UIView
{
float preValue;
float minValue;
float maxValue;
float currentValue;
float vx;
}
@property (nonatomic, retain)UIImageView * bgImageView;
@property (nonatomic, retain)UIImageView * imageView;
@property (nonatomic, retain)NSTimer * timer;
@property (nonatomic, readwrite) float currentValue;
@property (nonatomic, readwrite) float maxValue;
@property (nonatomic, assign)BOOL isAnimation;
- (id)initWithFrame:(CGRect)frame imageName:(NSArray *)array;
@property (nonatomic,assign) id delegate;
@end
@protocol BaseProgressBarDelegate
-(void)progressEnd;
@end
#import "BaseProgressBar.h"
#import "DrawAndAnimation.h"
#import "ImageManager.h"
#import "GameConst.h"
//设置圆角需要倒的包
#import <QuartzCore/QuartzCore.h>
@implementation BaseProgressBar
@synthesize timer;
@synthesize maxValue;
@synthesize currentValue;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
self.backgroundColor = [UIColor clearColor];
//设置圆角代码
[self.layer setMasksToBounds:YES];
[self.layer setBorderWidth:1.0];
minValue = 0.0f;
maxValue = 1.0f;
currentValue = 0.0f;
preValue = currentValue;
}
return