You want to display a progress bar on the screen, depicting the progress of a certain task; for instance, the progress of downloading a file from a URL.
Instantiate a view of type
UIProgressView and place it on another
A progress view is what programmers generally call a progress bar. An example of a progress view is depicted in Figure 2-84.
Figure 2-84. A simple progress view
Progress views are generally displayed to users to show them the
progress of a task that has a well-defined starting and ending point.
For instance, downloading 30 files is a well-defined task with a
specific starting and ending point. This task obviously finishes when
all 30 files have been downloaded. A progress view is an instance of
UIProgressView and is initialized
using the designated initializer of this class, the
initWithProgressViewStyle: method. This method
takes in the style of the progress bar to be created as a parameter.
This parameter is of type
UIProgressViewStyle and can therefore be one
of the following values:
This is the default style of the progress view. An example of this is the progress view shown in Figure 2-84.
This is similar to the
UIProgressViewStyleDefault but is meant
to be used for progress views that are to be added to a
An instance of