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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:01:01+00:00 2026-05-17T19:01:01+00:00

I have a navigationController from where I launch a ModalViewController. In this ModalViewController I

  • 0

I have a navigationController from where I launch a ModalViewController.
In this ModalViewController I will display the MailComposer which itself another ModalViewController.

Now if the user hits the send button the MailComposerView should be dismissed as well the other ModalViewController. For that I call a delegate method in the mailComposerController.

Now only the MailComposerView will be dismissed but no the the other ModalViewController and I get following error message

attempt to dismiss modal view controller whose view does not currently appear. self = <UINavigationController: 0x724d500> modalViewController = <UINavigationController: 0x72701f0>

Do you have any Idea would I’m doing wrong?

First ModalView

- (void)addList {
NSLog(@"addList");

//AddListViewController *addListViewController = [[AddListViewController alloc] init];
AddListViewController *addListViewController = [[AddListViewController alloc] initWithStyle:UITableViewStyleGrouped];
addListViewController.delegate = self;

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addListViewController];
navigationController.navigationBar.barStyle = UIBarStyleBlack;
navigationController.navigationBar.translucent = YES;
[self presentModalViewController:navigationController animated:YES];

[navigationController release];
[addListViewController release];    }

In the AddListViewController calling the MailView

MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];
    mailComposer.mailComposeDelegate = self;

    NSString *subject = [NSString stringWithFormat:@"Group invite for groupname: %@", @"mhm"];
    [mailComposer setSubject:subject];

    // Fill out the email body text
    NSString *emailBody = @"This is an group invite bla bla";
    [mailComposer setMessageBody:emailBody isHTML:NO];

    [self presentModalViewController:mailComposer animated:YES];
    [mailComposer release]; 

In the mailComposerController method

[self.navigationController dismissModalViewControllerAnimated:YES];
[self.delegate finishAddList:checkmark andListName:listName.text];

In the finsihAddList delegate

[self dismissModalViewControllerAnimated:YES];
  • 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-17T19:01:01+00:00Added an answer on May 17, 2026 at 7:01 pm

    You must call the second dismiss with a delay, because the first dismiss hasn’t been done yet when called.

    [self performSelector: @selector(finish:) withObject: obj afterDelay: 0.0f];
    

    A delay of 0.0f is intentional, it means it will be done in the next event loop.

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

Sidebar

Related Questions

Say I have NavigationController->Root[Table View Controller subclass] So from didSelectRowAtIndexPath of my Table View
From my navigationController I have two paths: navigationController --> ViewControllerA -- ViewControllerB (currently showing).
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you managed to get Aptana Studio debugging to work? I tried following this,
Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the
I have a navigationController, I push a new viewController onto it's stack, I have
To explain what I'm trying to do: I have a navigationController with a list
I have an iPad app that is set to start in landscape mode. From
i have this at my appdelegate: for 1st app: - (void)applicationDidFinishLaunching:(UIApplication *)application { [window
I have found this example on StackOverflow: var people = new List<Person> { new

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.