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 7578031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:20:04+00:00 2026-05-30T17:20:04+00:00

I would like to segue a destination scene through a button present in source

  • 0

I would like to segue a destination scene through a button present in source scene. I also would like to have a control of the transition animation between the viewcontroller (I want to animate the 2 views from right to left). Is it possible to do so through the replace segue? I try both the replace segue and the push segue but the segue is not happening any suggestion how i should proceed there? Thanks!

  • 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-05-30T17:20:06+00:00Added an answer on May 30, 2026 at 5:20 pm

    I found out that the replace segue and push segue were misleading because the replace seems to be available for a master detail controller and the push segue for a navigation controller only. In this case I needed to implement a customize segue instead. You need to subclass the UIStoryboardSegue and override the perform segue.

    Here is an e.g of my code:

    -(void)perform{
        UIView *sourceView = [[self sourceViewController] view];
        UIView *destinationView = [[self destinationViewController] view];      
    
        UIImageView *sourceImageView;
        sourceImageView = [[UIImageView alloc] 
                           initWithImage:[sourceView pw_imageSnapshot]];
    
        // force the destination to be in landscape before screenshot
        destinationView.frame = CGRectMake(0, 0, 1024, 748);
        CGRect originalFrame = destinationView.frame;
        CGRect offsetFrame = CGRectOffset(originalFrame, originalFrame.size.width, 0);
    
    
        UIImageView *destinationImageView;
        destinationImageView = [[UIImageView alloc] 
                                initWithImage:[destinationView pw_imageSnapshot]];
    
        destinationImageView.frame = offsetFrame;  
        [self.sourceViewController presentModalViewController:self.destinationViewController animated:NO];
    
        [destinationView addSubview:sourceImageView];                        
        [destinationView addSubview:destinationImageView]; 
    
        void (^animations)(void) = ^ {                                     
            [destinationImageView setFrame:originalFrame];
    
        };
    
        void (^completion)(BOOL) = ^(BOOL finished) {                       
            if (finished) {
    
                [sourceImageView removeFromSuperview];
                [destinationImageView removeFromSuperview];
    
            }
        };
    
        [UIView animateWithDuration:kAnimationDuration delay:.0 options:UIViewAnimationOptionCurveEaseOut animations:animations completion:completion];
     }
    

    The main idea is to create a screenshot view of the source and destination scene; add them to the destination scene view, control the animation of those two views, call to the presentModalViewController function on the sourceviewController and remove the two screenshots views when done with the animation.

    One can found an example of implementing a screenshot utility function here in Ch15 of this link: http://learnipadprogramming.com/source-code/

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

Sidebar

Related Questions

I would like implement a button to show another view. I have defined the
I would like to have a reference for the pros and cons of using
I would like to apply this css on my .FileUpload button , but It
would like to know how can this be implemented in Joomla. I have a
I basically have a splitview controller and immediately I would like to show a
Would like to use an Image button in my widget layout. I want an
would like to print a random number between 0 and 10, but generate seems
would like to have a central place to register new signals, connect to signals,
Would like to ask for advice. there is a need for binary to have
Would like a button in my widget to fire the APPWIDGET_UPDATE intent on the

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.