Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8381067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:36:54+00:00 2026-06-09T16:36:54+00:00

I have created two custom segue files and in both, I have overrode the

  • 0

I have created two custom segue files and in both, I have overrode the perform method. However, it seems that the custom segue only works when presenting the new UIViewController, and the reverse one, does not animate just dismisses the source UIViewController.

Reverse custom segue:

- (void)perform {
UIViewController *sourceViewController = self.sourceViewController;
    UIViewController *sourceTabBarController = sourceViewController.parentViewController.parentViewController;
    UIViewController *destinationViewController = self.destinationViewController;
    UIGraphicsBeginImageContext(destinationViewController.view.bounds.size);
        [destinationViewController.view.layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage *destinationViewControllerImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

    UIImageView *destinationViewControllerImageView = [[UIImageView alloc] initWithImage:destinationViewControllerImage];
    destinationViewControllerImageView.userInteractionEnabled = YES;
    destinationViewControllerImageView.frame = CGRectMake(0.0f, 0.0f, CGRectGetWidth(destinationViewController.view.frame), CGRectGetHeight(destinationViewController.view.frame));

[destinationViewController.view insertSubview:destinationViewControllerImageView atIndex:1];

// Add animations
    [UIView animateWithDuration:0.4f
                          delay:0.0f
                        options:UIViewAnimationOptionCurveEaseIn
                     animations:^{
                         destinationViewControllerImageView.center = CGPointMake(-CGRectGetWidth(destinationViewControllerImageView.frame) / 2, -(CGRectGetHeight(destinationViewControllerImageView.frame) / 2));
                     }
                     completion:nil];

    [sourceViewController dismissViewControllerAnimated:NO completion:nil];
}

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:36:55+00:00Added an answer on June 9, 2026 at 4:36 pm

    Segues add a new version of a view controller. When I was starting out I had some interesting problems with using segues to dismiss view controllers.

    Instead of writing a custom segue, you should use a custom animation block in the view controller you are “dismissing to”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one gridview and use custom adapter for that. I added two
I have created one gridview and use custom adapter for that. I added two
I have created a custom validator (below) that checks two textboxes to make sure
I have created two custom controls. On the basis of features any one of
I have created two folders layout and layout-land with two xml files, one for
I have created two files: tunables.h #ifndef TUNABLES_H #define TUNABLES_H void tunables_load_conservative(); void tunables_load_aggressive();
I have created a custom control using VB.NET in Visual Studio 2008 that gives
I have created a custom validation rule (uniqueUserName). The problem I'm having is that
I have created a custom keyboard and I have two text fields. When the
I have created a custom keyboard and I have two text fields. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.