小ネタですが、UIProgressView を指定秒数でアニメーションさせる方法です。
// 初期化
_progressView.progress = 1;
[_progressView layoutIfNeeded];
[UIView animateWithDuration:10 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
_progressView.progress = 0;
[_progressView layoutIfNeeded];
} completion:^(BOOL finished) {
NSLog(@"アニメーション完了");
}];
[_progressView layoutIfNeeded];
がポイントで、これがないと期待通り動作しません。
カウントダウン表示などに便利です。いつか必ず皆さんのお役に立つでしょう。