UIImageView setAnimationImages

来源:互联网 发布:想买摔炮在淘宝怎么搜 编辑:程序博客网 时间:2024/06/05 15:09

UIImageView *actionImageView  = [[UIImageView alloc]initWithFrame: self.view.frame];

[actionImageView setAnimationImages:[NSArray arrayWithObjects

                                         [UIImage imageNamed:@"1.png"],

                                         [UIImage imageNamed:@"2.png"],

                                         [UIImage imageNamed:@"3.png"],

                                         [UIImage imageNamed:@"4.png"],

                                         [UIImage imageNamed:@"5.png"],

                                          [UIImage imageNamed:@"6.png"],

                                         [UIImage imageNamed:@"7.png"],

                                         [UIImage imageNamed:@"8.png"],

                                         [UIImage imageNamed:@"9.png"],

                                         [UIImage imageNamed:@"10.png"],

                                         [UIImage imageNamed:@"11.png"],

                                         [UIImage imageNamed:@"12.png"],

                                        nil]];

[self.view addSubview:actionImageView];

 actionImageView.animationDuration =1;

 [actionImageView startAnimating];



0 0
原创粉丝点击