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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:13:16+00:00 2026-05-26T22:13:16+00:00

This is probably going to be very obvious, but here goes. I have two

  • 0

This is probably going to be very obvious, but here goes. I have two ViewControllers, one that shows the details of a person with a [+] button that opens up another ViewController that manages the edits of the Person. When the person about to be deleted, an alert is presented and if OK is selected, the edit view should disappear and the DetailView should also disappear/transition back to the PersonsListView (not shown in code below).

I can get the EditView to dismiss, but I can’t get the DetailView to dismiss as well.

Any help is appreciated.

The two ViewControllers:

@implementation PersonDetailViewController
...
- (void)editPerson
{
    PersonDetailEditViewController *editView = [[PersonDetailEditViewController alloc] initWithTenant:self.person];
    [editView setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];

    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:editView];
    [self presentModalViewController:navController animated:YES];    
}
...
@end

and

@implementation PersonDetailEditViewController
...
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 1) {
        [Person deletePerson:self.person];
        NSError *error;
        [self.person.managedObjectContext save:&error];
        [[self navigationController] dismissModalViewControllerAnimated:YES];
        // *** HERE I ALSO WANT TO DISMISS THE DETAILVIEW ***
    }
}
...
@end
  • 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-26T22:13:17+00:00Added an answer on May 26, 2026 at 10:13 pm

    Assuming that PersonDetailViewController is presented in a navigation controller you should be able to do what you want by adding the following line:

    [self.navigationController popViewControllerAnimated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I guess this is probably going to be obvious in retrospect but I am
This is probably a very simple and stupid question to ask, but I have
This is probably a simple one but I'm very much a regex novice. I'm
You can probably see where I am going with this - but is there
This probably has a simple answer, but I must not have had enough coffee
This probably sounds really stupid but I have noo idea how to implement jquery's
This probably sounds like a terrible idea at first glance, but here is my
This is probably going to be more of a discussion or hypothetical question, but
I'm probably going about this all wrong, but hey. I am rendering a large
I know this is probably a very beginner question that I just can't seem

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.