开发者

How to create a custom Activity Indicator in Xcode [duplicate]

This question already has answers here: Create custom activity indicator in iPhone SDK? (3 answers) Closed 9 years ago. 开发者_开发知识库

i need a know how to create a custom activity Indicator in xcode, i tired of searching in websites, i didn find anything about it.Please help meee...


The activity indicator is just an image view with an image sequence animation. To make your own make still pictures of each frame of your activity indicator animation and use code like this:

UIImageView *customActivityIndicator = [[UIImageView alloc] initWithFrame:CGRectMake(...)];

customActivityIndicator.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"frame1.png"],[UIImage imageNamed:@"frame2.png"],[etc...],[etc...],nil];
customActivityIndicator.animationDuration = 1.0; // in seconds
customActivityIndicator.animationRepeatCount = 0; // sets to loop

[customActivityIndicator startAnimating]; // starts animating
[customActivityIndicator stopAnimating]; //stops animating


What are you calling custom activity Indicator ? it could be just an icon...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜