我想動畫多個圖像的啓動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