开发者

Time to display animation

How much time in seconds will it take to display an animation if you have 60 images using UIImageView class for property animationDura开发者_运维技巧tion

please answer this i am unable to respond it.....

good answer will get at least 4 up votes from all my friend group Thanks


According Apple's reference:

animationDuration

The time duration is measured in seconds. The default value of this property is equal to the number of images multiplied by 1/30th of a second. Thus, if you had 30 images, the value would be 1 second.

Thus with 60 images, if you don't set animationDuration, it will be 2 seconds.

When you set a custom value (say n seconds) for this property, it corresponds to the animation total duration (each image will be displayed during n/60 seconds).


That depends upon the time you have set in animationDuration.

Say for example

NSArray *myImages = [NSArray arrayWithObjects:image1,image2,......image60, nil];
myImage.animationImages = myImages;
myImage.animationDuration = 0.5;
myImage.animationRepeatCount = 1; // 0 = loops forever 
[myImage startAnimating];

This animation is gonna take numberOfImages*animationDuration (i.e. 60*0.5=30 seconds)

Hope its clear now....

hAPPY iCODING...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜