在ios教程中有很多种办法能够为imageView添加
图片实现
动画,专门整理了本篇为imageView添加图片实现动画的总结,希望能帮助到大家。 //为图片
设置动态self.imageView.animationImages = animateArray //为动画设置持续时间self.imageView.animationDuration = 3.0//创建imageViewself.imageView = [[UIImageViewalloc]initWithFrame:CGRectMake(0, 40, 320, 260)]//把图片添加到动态数组NSMutableArray * animateArray = [[NSMutableArrayalloc]initWithCapacity:20] [animateArray addObject:[UIImage imageNamed:@"t1.png"]] [animateArray addObject:[UIImage imageNamed:@"t2.png"]] [animateArray addObject:[UIImage imageNamed:@"t3.png"]] [animateArray addObject:[UIImage imageNamed:@"t4.png"]] [animateArray addObject:[UIImage imageNamed:@"t5.png"]] [animateArray addObject:[UIImage imageNamed:@"t6.png"]] [animateArray addObject:[UIImage imageNamed:@"t7.png"]] [animateArray addObject:[UIImage imageNamed:@"t8.png"]] [animateArray addObject:[UIImage imageNamed:@"t9.png"]] [animateArray addObject:[UIImage imageNamed:@"t10.png"]] [animateArray addObject:[UIImage imageNamed:@"t11.png"]] [animateArray addObject:[UIImage imageNamed:@"t12.png"]] [animateArray addObject:[UIImage imageNamed:@"t13.png"]] [animateArray addObject:[UIImage imageNamed:@"t14.png"]] [animateArray addObject:[UIImage imageNamed:@"t15.png"]] [animateArray addObject:[UIImage imageNamed:@"t16.png"]] [animateArray addObject:[UIImage imageNamed:@"t17.png"]] [animateArray addObject:[UIImage imageNamed:@"t18.png"]] [animateArray addObject:[UIImage imageNamed:@"t19.png"]] [animateArray addObject:[UIImage imageNamed:@"t20.png"]] //开始播放动画 [self.imageView startAnimating]//为默认的无限循环self.imageView.animationRepeatCount = 0 [self.view addSubview:self.imageView]WindowManager动画有要求,要求一定要是系统style里的动画组,其他设置是无效的!
你可以设置R.style.Animation_Toast试试!这是Toast效果动画!
话说你分类搞错了,还好我看到了……
评论列表(0条)