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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:35:28+00:00 2026-05-27T00:35:28+00:00

I want to pop a modal view and the previous view at the same

  • 0

I want to pop a modal view and the previous view at the same time. For example, look at the calendars app. When I am on the Edit screen and select Delete Event, I am taken back to the calendar view.

The Edit screen, which was presented modally is popped as well as the the Event screen (where the user is just viewing the calendar event). The problem I am having is that I know how to pop a modal view, but from the same UIViewController subclass (Edit screen in this example).

How can I pop a view that isn’t modal?

I was thinking about popping the modal view as you would normally, then posting a NSNotification to the ‘Event‘ (for instance) screen’s UIViewController subclass and telling it to pop that view as well.

The other thing is that for the animation, it should be the dismissModalViewControllerAnimated animation (slide down) and not the popViewControllerAnimated animation (slide left).

Looking for a better solution, I found this, which doesn’t work in my case (at least not with popViewControllerAnimated.

  • 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-27T00:35:29+00:00Added an answer on May 27, 2026 at 12:35 am

    You need to use the delegate pattern to notify the modal “parent” that it should dismiss the modal view controller (animated:NO) and pop itself off the stack (animated:YES).

    This is exactly what happens on the Calendar App – just pay attention to what happens to the navigation bar title when you confirm an event deletion – you can see the title quickly changing from “Edit” to “Event Details” as that view is being popped out off the navigation stack.

    So in a nutshell, if we were talking about the calendar app, in your modal view controller, create a protocol with a method like didConfirmEventDeletion:

    @protocol ModalViewDelegate <NSObject>
    - (void)didConfirmEventDeletion;
    @end
    
    @interface ModalViewController...
    
    @property (nonatomic, assign) id<ModalViewDelegate> delegate;
    
    @end     
    

    And implementation:

    @implementation ModalViewController
    
    - (void)deleteEventMethod
    {
        ...
        if ([self.delegate respondsToSelector:@selector(didConfirmEventDeletion)])
             [self.delegate didConfirmEventDeletion];
    }
    

    Then in your parent view controller, declare itself as the delegate for the modal and implement didConfirmEventDeletion:

    - (void)didConfirmEventDeletion
    {
        [self dismissModalViewControllerAnimated:NO];
        [self.navigationController popViewControllerAnimated:YES];
    }
    

    PS: there might be a few typos as I wrote this code off memory…

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

Sidebar

Related Questions

I want to use modal pop-up windows in our web app in Ruby on
I want to show a modal dialog/pop-up window when the user has not filled
I have a modal pop up function on my website, but i don't want
Can I show a modal pop-up instead of showing a progress indicator? I want
Q: I want to list the most used modal pop up in asp.net to
I want to toggle between a div on a pop-up modal form. The problem
I want to pop up a dialog box that says Saving... and once the
I want to pop up a form in C# .net 2.0 which should be
I want to pop a browser with a given url from within a windows
I have several dialogs in the application. I want to pop up help related

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.