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

The Archive Base Latest Questions

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

When presenting a modal view controller how does one then interact with the parent

  • 0

When presenting a modal view controller how does one then interact with the parent view controller once the presented view controller is dismissed.

From what I understand viewWillAppear does not get called on the parent view controller when dismissing the modal view controller. How then does one update the UI based on the input taken in on the modal view controller?

Can the modal view controller call methods on it’s parent view controller? i.e [self.parentViewController doWhatIWant];?

Or alternatively is there a method that gets called on the parent view controller when the modal view controller is dismissed?

  • 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-09T13:51:38+00:00Added an answer on June 9, 2026 at 1:51 pm

    You can provide the modal controller with an instance of parent before displaying it modally, letting it call you back:

    @class ParentViewController;
    
    @interface ControllerToBeShownModally : UIViewController
    
    @property (nonatomic, readwrite) ParentViewController* parentViewController;
    
    // More items
    
    @end
    

    Displaying ControllerToBeShownModally:

    ControllerToBeShownModally *ctrl = [[ControllerToBeShownModally alloc] init...];
    ctrl.parentViewController = self; // Store the back reference here
    [self presentModalViewController:ctrl animated:YES];
    

    Calling back:

    [self.parentViewController doWhatIWant];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am dismissing one modal view controller and then immediately presenting another modal view
I'm dismissing a modal view controller and then immediately presenting another one, but the
I am presenting a modal view controller like this from a table view (ignore
In my iPhone app, I'm presenting a modal view controller from a home screen
In my application I am presenting a modal view controller on top of the
I'm getting a white screen after presenting a modal view controller. This is how
When presenting a modal form sheet view controller on the iPad the remainder of
I have a modal view controller that I am presenting on iPad via: vc.modalPresentationStyle
I'm presenting a modalViewController. After I dismiss the modal view controller with: - (void)dismissModalViewControllerAnimated:(BOOL)animated
What I'm doing: In my app, I'm presenting a modal view controller (containing app

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.