IOS basics-UIProgressView
UIProgressView and UIActivityIndicator are similar.
But the difference is that,
UIProgressView can reflect the progress more accurately
UIActivityIndicator indicates that the transaction is in progress.
In the Mail program, when downloading information, a UIProgressView is displayed at the bottom.
-(Void) viewDidLoad {[super viewDidLoad]; // define a progress bar UIProgressView * progressV = [[UIProgressView alloc] init]; progressV. frame = CGRectMake (100,100, 2,300); // progress value progressV. progress = 0.1;/* typedef NS_ENUM (NSInteger, UIProgressViewStyle) {UIProgressViewStyleDefault, // default state UIProgressViewStyleBar, // generally used for toolbar}; */progressV. progressViewStyle = UIProgressViewStyleDefault; // set the color of the filled part (assuming that the progress is 30%, the color of 30% is this attribute) progressV. progressTintColor = [UIColor greenColor]; // set the color of the unfilled part (assuming that the Progress reaches 30%, the color of 70% is this attribute) progressV. trackTintColor = [UIColor redColor]; // sets the filling part of the image. After setting the image, progressTintColor is invalid progressV. progressImage = [UIImage imageNamed: @ "1"]; // The trackTintColor is invalid after the image is set for the unspecified part. trackImage = [UIImage imageNamed: @ "2"]; [self. view addSubview: progressV];} // The current progress value of the key SS attribute, and whether to set the animation-(void) setProgress :( float) aniss animated :( BOOL) animated {}