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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:29:11+00:00 2026-06-17T08:29:11+00:00

I’ve been stuck with this problem for a while now, can’t find any useful

  • 0

I’ve been stuck with this problem for a while now, can’t find any useful information on how to do this..

I have a base view (view 1), where I can select items in a tableview. While on the items “page” (view 2) I can choose to edit that item, triggering a modalview (view 3).
In this modalview, I have the option to delete this item. If the user pressed that button and confirms they want to delete the item, I want to send the app back to view 1..

I’ve tried a number of different things (popToViewController, pushViewController, dismissViewController etc etc) but I can’t get anything to work. If I get the modal to close, view 2 doesn’t close. Sometimes even the modal doesn’t disappear. The base view is a UITableViewController, the other two are UIViewControllers, and I’m using storyboard.

  • 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-17T08:29:12+00:00Added an answer on June 17, 2026 at 8:29 am

    You have several options you can either use NSNotificationCenter or use the delegate pattern.
    NSNotificationCenter is easy to use but also it is tricky.

    To use notification center you need to add observers to your view controller classes.When you dismiss your modal view controller you notify your view 2 that view 3 is dismissed now, view2 can dismiss itself…..

    So basically when you notify the center, whatever in notified it runs a method etc….

    Lets say your at view 3, you want to dismiss your views.

    in view3 .m

    -(IBAction)yourMethodHere
    {
            //dissmiss view
            [self.navigationController dismissModalViewControllerAnimated:YES];
             // or [self dismissModalViewControllerAnimated:YES]; whateever works for you 
    
            //send notification to parent controller and start chain reaction of poping views
            [[NSNotificationCenter defaultCenter] postNotificationName:@"goToView2" object:nil];
    }
    

    in view 2 . h

    // For name of notification
    extern NSString * const NOTIF_LoggingOut_Settings;
    

    in view 2. m before @implementation after#imports

    NSString * const NOTIF_LoggingOut_Settings = @"goToView2";
    
        @implementation
        -(void)viewDidAppear:(BOOL)animated{
    
            // Register observer to be called when logging out
            [[NSNotificationCenter defaultCenter] addObserver:self
                                                     selector:@selector(loggingOutSettings:)
                                                         name:NOTIF_LoggingOut_Settings object:nil];
        }
        /*---------------------------------------------------------------------------
         * Notifications of 2 view
         *--------------------------------------------------------------------------*/
        - (void)loggingOutSettings:(NSNotification *)notif
        {
            NSLog(@"Received Notification - Settings Pop Over  popped");
    
            [self.navigationController popViewControllerAnimated:NO];// change this if you do not have navigation controller 
    
    //call another notification to go to view 1 
            [[NSNotificationCenter defaultCenter] postNotificationName:@"goToFirstView" object:nil];
        }
    

    add another observer to your first view
    in your view1.h
    extern NSString * const NOTIF_FirstView;

    in view 1. m before @implementation after#imports

    NSString * const NOTIF_FirstView = @"goToFirstView";

    @implementation
    -(void)viewDidAppear:(BOOL)animated{
    
        // Register observer to be called when logging out
        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(doYourThing:)
                                                     name:NOTIF_FirstView object:nil];
    }
    /*---------------------------------------------------------------------------
     * Notifications of 1 view
     *--------------------------------------------------------------------------*/
    - (void)ldoYourThing:(NSNotification *)notif
    {
    
    
     // do your thing
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have been unable to fix a problem with Java Unicode and encoding. The
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string

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.