LFRoundProgressView.h 1.96 KB
Newer Older
houweibin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
//
//  LFRoundProgressView.h
//  LFRoundProgressView
//
//  Created by Matej Bukovinski on 2.4.09. detail see MBProgressHUD
//  Version 1.0
//  modified by shiqiang on 14/1/3.
//

#import <UIKit/UIKit.h>

#ifndef MB_STRONG
#if __has_feature(objc_arc)
    #define MB_STRONG strong
#else
    #define MB_STRONG retain
#endif
#endif

/**
 * A progress view for showing definite progress by filling up a circle (pie chart).
 */
@interface LFRoundProgressView : UIView

/**
 * Progress (0.0 to 1.0)
 */
@property (nonatomic, assign) float progress;

/**
 * Indicator progress color.
 * Defaults to white [UIColor whiteColor]
 */
@property (nonatomic, MB_STRONG) UIColor *progressTintColor UI_APPEARANCE_SELECTOR;

/**
 * Defaults as white [UIColor whiteColor]
 * NO = annular. progressBackgroundColor is affect.
 */
@property (nonatomic, MB_STRONG) UIColor *progressBackgroundColor UI_APPEARANCE_SELECTOR;

/**
 * Indicator background (non-progress) color.
 * Defaults to translucent white (alpha 0.1)
 */
@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor UI_APPEARANCE_SELECTOR;


/*
 * show or hide text percent in center(e.g 68%) - NO = hide or YES = show. Defaults to hide.
 */
@property (nonatomic, assign) BOOL percentShow;// Can not use BOOL with UI_APPEARANCE_SELECTOR :-(

/**
 *  default is [UIColor whiteColor]
 */
@property (nonatomic, MB_STRONG) UIColor *percentLabelTextColor UI_APPEARANCE_SELECTOR;
/**
 *  default is [UIFont boldSystemFontOfSize:12.f]
 */
@property (nonatomic, MB_STRONG) UIFont *percentLabelFont UI_APPEARANCE_SELECTOR;


/*
 * Display mode - NO = round or YES = annular. Defaults to annular.
 */
@property (nonatomic, assign) BOOL annular;// Can not use BOOL with UI_APPEARANCE_SELECTOR :-(

/*
 * YES = annular. annularLineCapStyle is affect.
 */
@property (nonatomic, assign) CGLineCap annularLineCapStyle UI_APPEARANCE_SELECTOR;

/**
 * Progress (0.0 to 8.0) default 4.0f
 */
@property (nonatomic, assign) CGFloat annularLineWith UI_APPEARANCE_SELECTOR;



@end