LoginSignup
9
9

More than 5 years have passed since last update.

UIPrgogressViewのアニメーションスピード

Posted at

全部進みきるまでに1[sec]

progressView.progress = 0.0;
[progressView setProgress:1.0 animated:YES];

としたとき、アニメーションが完了するまでの時間は 1.0[sec]

調べ方

UIProgressViewをサブクラスした上で layoutSubViewsをオーバーライド

@implementation CustomProgressView

- (void)layoutSubviews {

    [super layoutSubviews];

    UIView *v = self.subviews[1];
    for (NSString *key in v.layer.animationKeys) {
        CAAnimation *a = [v.layer animationForKey:key];
        NSLog(@"%lf", a.duration);
    }

}

@end

とした上で – setProgress:animated:を呼ぶとアニメーションのdurationがコンソールに表示されます。

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9