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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:30:37+00:00 2026-06-13T18:30:37+00:00

i have three controller and i wanna kown the controller is a push or

  • 0

i have three controller and i wanna kown the controller is a push or pop

A controller:

{
    if(!b)
     b = [B alloc] init];
    [self.navigationController pushViewController:b animated:YES];
}

B controller:

- (void) viewDidAppear:(BOOL)animated 
{
     [super viewDidAppear:animated];
     //I want here to judge, from the "A" push over, or to return from the "C" "pop"

     //if it is push from A 
     //dosomething.....


     //if it is pop from C
     //dosomething
}
-(void)testAction:(id)sender
{
    C *c = [[C alloc] init];
    [self.navigationController pushViewController:b animated:YES];
    [c release];
}

C controller:

{
    [self.navigationController popViewControllerAnimated:YES];
}

thanks.

  • 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-13T18:30:39+00:00Added an answer on June 13, 2026 at 6:30 pm

    EDIT :

    Add UINavigationControllerDelegate in .h file
    

    Also do this:

    [self.yournavController setDelegate:self];
    

    Method below is navigation controller delegate which is called when the navigation controller shows a new top view controller via a push, pop or setting of the view controller stack.

    Add this method

    - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three table views inside a view controller (going to show/hide table views
I have three views each represented by a View controller named firstVC, secondVC and
I have a UITabBarController with three tabs: each is a navigation controller with a
I have three IBActions, each linked with it's own button like so: #import Controller.h
I have three view controllers, one root controller, one login view controller and one
I wanna create an app that will have three view controllers. To navigate between
I have three roles: Instuctor, Student, Admin and each have controllers with a home
Hi there I have 3 files in rails as follows: 1)Located at app/controller/listings_controller.rb class
Example: I have a view controller and get rid of it. But there's still
Just wondering if there is a way in Spring to have a parent controller:

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.