Drag the button link to the new view and select a custom Segue instead of Push or Modal.

Change the new custom Segue class to "mySegueClass1" or whatever you want to name.

Create a new Objective-C class with the same name as the custom segment.
Then in the mySegueClass1.m file add the following code and add what additional actions you want to do -(void)perform
-(void)perform{ UIViewController *dst = [self destinationViewController]; UIViewController *src = [self sourceViewController]; [dst viewWillAppear:NO]; [dst viewDidAppear:NO]; [src.view addSubview:dst.view]; CGRect original = dst.view.frame; dst.view.frame = CGRectMake(dst.view.frame.origin.x, 0-dst.view.frame.size.height, dst.view.frame.size.width, dst.view.frame.size.height); [UIView beginAnimations:nil context:nil]; dst.view.frame = CGRectMake(original.origin.x, original.origin.y, original.size.height, original.size.width); [UIView commitAnimations]; [self performSelector:@selector(animationDone:) withObject:dst afterDelay:0.2f]; } - (void)animationDone:(id)vc{ UIViewController *dst = (UIViewController*)vc; UINavigationController *nav = [[self sourceViewController] navigationController]; [nav popViewControllerAnimated:NO]; [nav pushViewController:dst animated:NO]; }
source share