When you call:
[self dismissViewControllerAnimated:Yes.....];
it does the opposite of whatever animation was used to present the view.
Ex: If you call:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
View * myView = (View *) [storyboard instantiateViewControllerWithIdentifier:@"myViewName"];
[self myView animated:YES completion:nil];
It brings the view up from the bottom, and dismissViewControllerAnimated: would dismiss the view using the reverse animation, so the view would be sliding down.
Is there any way to Present a view with the sliding down animation? Any Help is greatly appreciated!
Use
CATransactionforanimation.Note: the below code
dependsonUIInterfaceOrientationforPresenting a viewwith thesliding down animationinall orienation.EDIT : In these methods set
currentorientation.So AddUIInterfaceOrientation viewOrientation;in .h file. These method may change according toiOS version