Ui: Use uiprogressview to display the progress bar

Source: Internet
Author: User

1. Problem

Do you want to display a progress bar on the screen ?? Describes the progress of a task. For example, download the entry of an object from a URL.

2.

The progress view is an instance object of uiprogressview. It is initialized by the initialization tool designed for this class. Use initwithprogressviewstyle: This method. The parameters of this method can specify the style of the progress bar. This parameter is of the uipogressviewstyle type and can be the following values: UiprogressviewstyledefaultThis is the default style.

UiprogressviewstylebarSimilar to uiprogressviewstyledefault, This is a progress view added to the toolbar. 

- (void)viewDidLoad{[super viewDidLoad];self.view.backgroundColor = [UIColor whiteColor];self.progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar]; self.progressView.center = self.view.center;self.progressView.progress = 0.5f;[self.view addSubview:self.progressView];}

 

Ui: Use uiprogressview to display the progress bar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.