2012-03-15 4 views
0

左から右へ、右から左へ、フェーディングすると、多くのトランジションアニメーションが見えますが、上から下にどのように移行できますか?すべてのヘルプトランジションアニメーションをスライドダウンするにはどうしたらいいですか?

+0

http://stackoverflow.com/questions/6605959/implement-custom-animation-to-present-modal-view-指定されたビュー・オン・iPadの –

+0

http://stackoverflow.com/questions/7188584/complete-list-of-transitions-you-can-do-between-views-on-iphone-ipad/7328633#7328633 – chikuba

答えて

0
[[self navigationController] presentModalViewController:modalViewController animated:YES]; 

とこのようにそれを隠すため

ありがとう:

[self.navigationController dismissModalViewControllerAnimated:YES]; 
+0

そうですね、このようなものも使用していますが、上から下に移動する方法を見つけることができません。 – user1035877

+0

このリンクを参照してください。 http://stackoverflow.com/questions/237310 /アニメーションスタイルのモーダルコントローラ –

0

あなたは、Core Animationのを使用することができますが、オブジェクトの種類をを使用していますか?基本的には

は、あなたがこれを行うオブジェクトをフェードインする:

[[objectName animator] setOpacity: 1]; 

はあなたにアニメーションが始まる前に0などに不透明度を設定するための最初の必要性を忘れないでください。 これはあなたの望むものだと思います。

0

ビューフレームをオフスクリーンの開始位置に設定してから、アニメーションを使用してフレームを所定位置に配置します。このワークアウト

CGRect originalFrame = [detailsView frame]; 
CGRect offscreenFrame = originalFrame; 
offscreenFrame.origin.y -= offscreenFrame.size.height; 
detailsView.frame = offscreenFrame; //Send the frame above screen   

//Add view here if necessary to an unscrew view 
// [aSuperView addSubview:detailsView]; 

[UIView beginAnimations:@"BringIn" context:nil]; 
[UIView setAnimationDuration:.3]; 
[UIView setAnimationDelegate:self]; 
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; 
detailsView.frame = originalFrame 
[UIView commitAnimations]; 
2

てみてください... 追加QuartzCoreフレームワーク

#import <QuartzCore/QuartzCore.h> 

CATransition *transDown=[CATransition animation]; 
[transDown setDuration:0.5]; 
[transDown setType:kCATransitionPush]; 
[transDown setSubtype:kCATransitionFromBottom]; 
[transDown setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; 

[Boottom_view.layer addAnimation:transDown forKey:nil]; 
関連する問題