Try this:
- (IBAction)ClickMe:(id)sender {
RegistraionViewController *secondController = [[RegistraionViewController alloc] init];
[self.navigationController pushViewController:secondController animated:YES];
}
- (IBAction) Click:(id)sender {
[self.navigationController popViewControllerAnimated:YES];
}
Edit:
I'm sorry. If you want custom some UIViewController transitions animation, see below:
UIViewController transition - objective-c
http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/
Or you can try this:
- (IBAction)ClickMe:(id)sender {
RegistraionViewController *secondController = [[RegistraionViewController alloc] init];
CATransition *transitionAnimation = [CATransition animation];
[transitionAnimation setDuration:1];
[transitionAnimation setType:@"push"];
[transitionAnimation setSubtype:kCATransitionFromBottom];
[transitionAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
[self.navigationController.view.layer addAnimation:transitionAnimation forKey:nil];
[self.navigationController pushViewController:secondController animated:NO];
}
- (IBAction)Click:(id)sender {
CRViewController *secondController = [[CRViewController alloc] init];
CATransition *transitionAnimation = [CATransition animation];
[transitionAnimation setDuration:1];
[transitionAnimation setType:@"push"];
[transitionAnimation setSubtype:kCATransitionFromTop];
[transitionAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
[self.navigationController.view.layer addAnimation:transitionAnimation forKey:nil];
[self.navigationController popToViewController:secondController animated:NO];
}