我想动画多个图像的启动screen.i显示3图像作为启动屏幕第一个是启动屏幕的默认图像比使用Ui-imageview我显示第二和第三我的Imageview。Fadout飞溅屏幕上的多个图像在IOS
我想在更改启动画面时淡出图像。我试过NSTimmer的解决方案,但它显示我直接第三个图像和缅因州屏幕比我尝试后,这个解决方案,但它显示我我的第二和第三个图像2次接连不断。 任何帮助表示赞赏
编辑/ - Nikki建议我一些解决方案,但我有混乱,哪个地方我取消隐藏我的第二个图像视图? 这里是我的代码
backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
backgroundImageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
backgroundImageView.image=[UIImage imageNamed:@"SPLASHSCREEN-2.png"];
backgroundImageView2 = [[UIImageView alloc] initWithFrame:self.view.bounds];
backgroundImageView2.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
backgroundImageView2.image=[UIImage imageNamed:@"SPLASHSCREEN-3.png"];
[self.view addSubview:backgroundImageView];
[self.view addSubview:backgroundImageView2];
[backgroundImageView2 setHidden:YES];
[self performSelector:@selector(performTransition) withObject:nil afterDelay:1.0];
-(void)performTransition
{
CATransition *animation3 = [CATransition animation];
[animation3 setDuration:3.0f];
[animation3 setType:kCATransitionReveal];
[animation3 setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[[backgroundImageView layer] addAnimation:animation3 forKey:@"SwitchToView"];
[backgroundImageView setHidden:YES];
[backgroundImageView2 setHidden:NO];//No animation happen while changing the image view
}
检查此链接http://stackoverflow.com/questions/13540300/fade-out-image-animation-in-iphone – Rushabh 2013-03-08 13:39:33
@Rushabh他已经提出NStimer技巧是不是有用的在他的情况。请再次阅读该问题。 – 2013-03-08 13:41:12
@Rushabh在NStimmer的情况下,它不显示默认图像,它直接跳转到第二张图像,并比主屏幕..第三闪屏和主屏幕不显示在NStimmer ..我要添加NStimer代码在主要问题可以你请提出任何解决方案 – 2013-03-08 13:49:37