A
UIProgressView
looks like horizontal thermometer with blue mercury.
You could make it vertical with the
CGAffineTransformMakeRotation
we saw
here,
but don’t—everyone expects it to be horizontal.
It fills from left
CGAffineTransformMakeScale
,
but don’t—everyone expects it to fill from left to right.
(What about Arabic and Hebrew?)
You could change the color with
progressTintColor
and
trackTintColor
,
but don’t—everyone expects it to be blue on gray.
If the height is less than 10 pixels (or pixel pairs),
part of the picture will be cut off.
See
Progress View
in the
Human
Interface Guidelines.
main.m
ProgressAppDelegate
ViewController
calls the
setProgress:
View
every second.View
Icon.png
This time, the
NSTimer
is set to
repeats:
YES
.
The infinite loop is broken when the
setProgress:
View
invalidate
s
the timer.
label.text = @"Downloading 000 of 100";Update it to
label.text = [NSString stringWithFormat: @"Downloading %3d of %3d", (int)(100 * progressView.progress), 100 ];
NSTimer
in
Switch
to update a time display while the music is playing?