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

  • Home
  • SEARCH
  • 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 6825233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:59:52+00:00 2026-05-26T21:59:52+00:00

When I transition from one view controller (let’s call it MasterViewController ) to another

  • 0

When I transition from one view controller (let’s call it MasterViewController) to another (called DetailViewController), in what order are the viewWillDisappear:, viewWillAppear:, etc. methods on each controller called?

I suspect some of the cleanup code called when my master view disappears is interfering with the initialization code in my detail view. I’ve looked through Apple’s documentation but can’t find any information involving multiple view controllers like this.

  • 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-26T21:59:53+00:00Added an answer on May 26, 2026 at 9:59 pm

    I created a simple UINavigationController-based project and added some NSLog statements to find out what order they get called in.

    1. Master prepareForSegue:
    2. Detail viewDidLoad
    3. Master viewWillDisappear:
    4. Detail viewWillAppear:
    5. The new view is displayed (with or without animation)
    6. Master viewDidDisappear: (after animation is finished)
    7. Detail viewDidAppear:

    However, when switching between views using a UITabViewController, the order is different:

    1. SecondTab viewDidLoad
    2. SecondTab viewWillAppear:
    3. FirstTab viewWillDisappear:
    4. The new view is displayed.
    5. FirstTab viewDidDisappear:
    6. SecondTab viewDidAppear:

    So it seems that you cannot always count on these events occuring in the same order – it can vary depending on the nature of the view controllers you are transitioning between.

    Are there any important points that I missed here?

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

Sidebar

Related Questions

How would I change from one view to another with a slide transition? Thanks.
I am attemting to transition from one UIView to another, when the user rotates
I am passing an NSDictionary object from one view class to another as I
I may be onto the wrong approach to transition one view to another in
How can I transition from one UIViewController (with bottom toolbar) to another one (without
I am using this code to transition from the current view to another and
I want to create transition animation within a UIView (not from one UIView to
I'm looking for a way to populate a table view from one single document,
I have a problem displaying a View Controller when calling a segue from code
In my quest to transition from a decade of C++ to Ruby, I find

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.