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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:46:52+00:00 2026-06-13T11:46:52+00:00

transitionFromViewController:toViewController:duration:options:animations:completion: Transitions between two of the view controller’s child view controllers. – (void)transitionFromViewController:(UIViewController *)fromViewController

  • 0

transitionFromViewController:toViewController:duration:options:animations:completion:

Transitions between two of the view controller’s child view
controllers.
– (void)transitionFromViewController:(UIViewController *)fromViewController toViewController:(UIViewController *)toViewController duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void
(^)(void))animations completion:(void (^)(BOOL finished))completion
Parameters

…

Discussion

This method adds the second view controller’s view to the view
hierarchy
and then performs the animations defined in your animations
block. After the animation completes, it removes the first view
controller’s view from the view hierarchy.

This method is only intended to be called by an implementation of a
custom container view controller. If you override this method, you
must call super in your implementation.

Am I correct that it simply means that [fromViewController.view.superview addsubview:toViewController.view] is called somewhere at the beginning of animation?

Also, does both fromViewController and toViewController need to be the child of self?

I just want confirmation and some explanation.

  • 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-13T11:46:53+00:00Added an answer on June 13, 2026 at 11:46 am

    Am I correct that it simply means that [fromViewController.view.superview addsubview:toViewController.view] is called somewhere at the beginning of animation?

    You are correct in this. What the text says, if you want, is that one view replaces the other. So, the latter takes the place of the other in the view hierarchy (as child of the superview) and your interpretation is the only possible one.

    Also, does both fromViewController and toViewController need to be the child of self?

    No. There need be no relationship between the two controllers.

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

Sidebar

Related Questions

I can't seem to find a good example on how to use transitionFromViewController:toViewController:duration:options:animations:completion: properly.
I have an app that transitions from view controller to view controller using the
I have 1 view controller acting as a CustomViewContainer and it has 2 child
I am trying to use UIViewController 's transitionFromViewController:toViewController:duration method but with a custom animation.
I have encountered application termination while dismissing a modal view controller. -[NSCFString window]: unrecognized
My app starts with a root view controller. Its job is to display a
I am trying to put together a simple container view controller that will allow
I have an iphone application that crashes when I switch between two of the
I have an issue with the orientation of my container controller. When switching between
I have a simple viewController. The View controller use animation. If I am displaying

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.