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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:47:58+00:00 2026-05-15T19:47:58+00:00

I have 2 view controllers presented modally. A presents B which presents C. When

  • 0

I have 2 view controllers presented modally.

A presents B which presents C.

When I dismiss C I would like to dismiss B as well. But I am not sure how to do this:

Dismiss C:

[self dismissModalViewControllerAnimated:YES]
//[delegate dismissB] //this doesn't work either when i create a delegate pattern

Now I am left with B. How can I dismiss B from C?

  • 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-15T19:47:59+00:00Added an answer on May 15, 2026 at 7:47 pm

    Try using the next code in B (right after dismissing C, as you already do):

    [self.parentViewController dismissModalViewControllerAnimated:YES];
    

    IMPORTANT:
    Don’t do anything in the method after this line.
    This view controller (B) probably will be released and deallocated…

    UPDATE:
    Starting from iOS7 the method above is deprecated.
    Use the next method instead:

    [self.parentViewController dismissViewControllerAnimated:YES completion:^{ /* do something when the animation is completed */ }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an UIViewController (called MainViewController ) which presents modally a semi-transparent view (
I have a view controller that gets presented modally and changes some data that
I have two view controllers in a tabbar which can both edit data. Therefore,
I have searched for and found various q/a on this error, but have not
I have a view controller that I would like to present in a modal
I have been following the modified Model View Controller example presented in this article
I have a viewcontroller that is presented modally. [self presentModalViewController:ViewControllerA animated:YES]; Within this ViewControllerA
Hey guys I need some help with this: I have two view controllers, let's
I'm not sure how this works. I have a UITabBarController where my first tab
I have root view that presents navigation controller with content controller, this is how

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.