0

I can see a lot of transition animation: from left to right, right to left, fading, but how can I make transition from the top down to bottom?

Thanks for all help

user1035877
  • 249
  • 1
  • 5
  • 15
  • http://stackoverflow.com/questions/6605959/implement-custom-animation-to-present-modal-view-from-specified-view-on-ipad – Max B. Mar 15 '12 at 08:01
  • http://stackoverflow.com/questions/7188584/complete-list-of-transitions-you-can-do-between-views-on-iphone-ipad/7328633#7328633 – chikuba Mar 15 '12 at 08:12

4 Answers4

2

Try working out this... Add QuartzCore framework

#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];
Sanket Pandya
  • 1,095
  • 7
  • 21
0
[[self navigationController] presentModalViewController:modalViewController animated:YES];

and hiding it like this:

[self.navigationController dismissModalViewControllerAnimated:YES];
MByD
  • 135,866
  • 28
  • 264
  • 277
Laxman Rana
  • 2,904
  • 3
  • 25
  • 37
0

Your could use Core Animation, what sort of object are you using?

Basically, to fade in an object you do this:

[[objectName animator] setOpacity: 1];

Remember you first need to set the opacity to 0 etc. before the animation begins. Hope this is what your wanting.

Oliver Cooper
  • 849
  • 7
  • 20
0

You set your view frame to it's starting position offscreen and then your bring your frame into position with some animation.

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];
Conor
  • 1,781
  • 17
  • 27