Summary of usage for progress bar controls in iOS.
The progress bar control is a simple system control in iOS development, with the following summary:
Initialize a progress bar:
-(instancetype) Initwithprogressviewstyle: (uiprogressviewstyle) style;
Note: 1. The progress bar system initialized in this way will default to a length.
2. The length of the progress bar can be set by frame, but only the first three parameters are valid.
3. The style enumeration is as follows:
typedef ns_enum (NSInteger, < Span class= "hljs-built_in" >uiprogressviewstyle) { uiprogressviewstyledefault, < Span class= "hljs-comment" >// Normal style uiprogressviewstylebar, // for toolbar style};
Set a progress bar style style
@property (nonatomic) Uiprogressviewstyle Progressviewstyle;
Set progress bar Progress (0.0-1.0, default = 0.0)
@property(nonatomic) float progress;
Set progress bar colors that have been traversed
@property (nonatomic, retain) uicolor* Progresstintcolor;
Set the progress bar color without passing progress
@property(nonatomic, retain) uicolor* Tracktintcolor;
Set the progress bar to the background pattern that has passed the progress and the background pattern for the progress (IOS7 seems to have no effect)
@property(nonatomic, retain) UIImage* progressimage;
@property(nonatomic, retain) UIImage* trackimage;
Set progress bar progress and whether to animate (animated display will smooth transitions)
-(void) setprogress: (float) Progress animated: (BOOL) animated;
IOS Uiprogressview Control Usage