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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:50:48+00:00 2026-06-05T15:50:48+00:00

I have a scrollview in my app and the second I scroll to the

  • 0

I have a scrollview in my app and the second I scroll to the last page of my scrollview I get segued to tableviewcontroller.

But in order to achieve “paging like animation” when jumping from scrollview to tableview controller I extended UIStoryboardSegue class and implemented perform method like this :

- (void) perform {
    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;

    src.view.transform = CGAffineTransformMakeTranslation(0, 0);
    dst.view.transform = CGAffineTransformMakeTranslation(320, 0);

    [UIView animateWithDuration:0.3
                     animations:^{
                         [src presentModalViewController:dst animated:NO];
                         src.view.transform = CGAffineTransformMakeTranslation(320, 0);
                         dst.view.transform = CGAffineTransformMakeTranslation(0, 0);
                     }
     ];
}

And it works like a charm when user is in UIInterfaceOrientationPortrait orientation. But when I switch to UIInterfaceOrientationLandscapeLeft or right I can’t get it to work.

What I basically want to do here is to perform segue so it looks like the tableviewcontroller is coming in from the left side onto the main screen (not from the top or bottom as it’s default behavior) like the above code works for normal orientation. I’ve imagined solution to be something like this :

- (void) perform {
    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;


    if ([[UIDevice currentDevice]orientation] == UIInterfaceOrientationLandscapeLeft || [[UIDevice currentDevice]orientation] == UIInterfaceOrientationLandscapeRight){

    }else{
    src.view.transform = CGAffineTransformMakeTranslation(0, 0);
    dst.view.transform = CGAffineTransformMakeTranslation(320, 0);
    }
    [UIView animateWithDuration:0.3
                     animations:^{
                         [src presentModalViewController:dst animated:NO];
                         if ([[UIDevice currentDevice]orientation] == UIInterfaceOrientationLandscapeLeft || [[UIDevice currentDevice]orientation] == UIInterfaceOrientationLandscapeRight){
                         }else{
                         src.view.transform = CGAffineTransformMakeTranslation(320, 0);
                         dst.view.transform = CGAffineTransformMakeTranslation(0, 0);
                         }
                     }
     ];
}

But it’s more difficult that I though, any help is appriciated.

question update :

I tried this now :

- (void) perform {
    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;

    [UIView transitionWithView:src.navigationController.view duration:0.3
                       options:UIViewAnimationTransitionFlipFromRight
                    animations:^{
                        [src.navigationController pushViewController:dst animated:YES];
                     }
     completion:NULL];
}

I get following error :

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'
  • 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-05T15:50:50+00:00Added an answer on June 5, 2026 at 3:50 pm
    1. Rather than ever hard coding a width 320, you should always determine at run time, e.g. src.view.frame.size.width.

    2. I’m surprised you were ok with the portrait presentation, as on my device, the old view is blinked out.

    3. Seems like your new attempt is a very different look (flipping as opposed to pushing). Which effect are you going for?

    If you want to flip, you could do something like:

    [UIView animateWithDuration:0.5
                     animations:^{
                         [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
                         [sourceViewController.navigationController.view addSubview:destinationViewController.view];
                         [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:sourceViewController.navigationController.view cache:NO];
                     }
                     completion:^(BOOL finished){
                         [destinationViewController.view removeFromSuperview];
                         [sourceViewController presentViewController:destinationViewController animated:NO completion:nil];
                     }];
    

    If you wanted more of a push, I generally just change frames/centers, e.g., you could do something like:

    float width = sourceViewController.navigationController.view.frame.size.width;
    
    CGPoint right = destinationViewController.view.center;
    right.x += width;
    destinationViewController.view.center = right;
    
    [sourceViewController.navigationController.view addSubview:destinationViewController.view];
    
    [UIView animateWithDuration:0.5
                     animations:^{
                         CGPoint left = sourceViewController.navigationController.view.center;
                         left.x -= width;
                         sourceViewController.navigationController.view.center = left;
                     }
                     completion:^(BOOL finished){
                         [destinationViewController.view removeFromSuperview];
                         [sourceViewController presentViewController:destinationViewController animated:NO completion:nil];
                     }
     ];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Case: I have original Page Control app from Apple. I would like to
In my app, I have a scrollview with paging enabled and when I chose
I have a horizontal scrollview in my app. On either side of the scrollview,
I have an app which contains a scrollview with several tableviews. Each tableview is
I have an app that shows a series of UIImageView s on a ScrollView
In my app I have a scroll view and four table views. Each time
I have a paged scroll view in my app and it works almost perfectly...
I have horizontal scrollviewer in my app. I would like that when I swipe
I have a paging UIScrollView in which the user pages horizontally through images, like
I have a long horizontal paged scrollview, for each page, I put a fullscreen

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.