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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:32:29+00:00 2026-05-27T21:32:29+00:00

If there are multiple views – say view 1, view 2, view 3, view

  • 0

If there are multiple views – say view 1, view 2, view 3, view 4 and view 5, and they are in a navigation stack with view 5 being the present view (which is on top), How can I access a method written in view3 in the controller for view5? Is it done like creating the instance of controller of view3 in the view5 controller and then call the method? But thats not the ideal approach I beleive. Whats the best approach for this scenario?

  • 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-27T21:32:29+00:00Added an answer on May 27, 2026 at 9:32 pm

    you can access that by accessing navigation controller stack-

    NSMutableArray *activeControllerArray = [self.navigationController.viewControllers mutableCopy];
    
    Controller3 myController;
    For(int i = 0, i <[activeControllerArray  count], i++) {
        if([[activeViewController objectAtIndex:i] isKindOfClass:[Controller3 class]) {
            myController = [activeViewController objectAtIndex:i];
         }
    }
    

    Now you can perform actions that you want.

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

Sidebar

Related Questions

I'm matching urls, so I can connect requests to controllers/views, and there are multiple
Say there are multiple requests in a integration test, some of them are local
I have an application where there are multiple processes. They share the reading and
I am working on an android application that requires multiple views which will overlap
I am developing an application which displays multiple views as tables (for example customers,
I would like to present multiple modal views in sequence (e.g. show confirmation page
I am using multiple partial views on my View. on the left-hand side. I
How do I pass variables to multiple partial views within a view? My idea
Is there a way to check if a modal view is present? I'd like
I have an app with a navigation controller as the root view. There are

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.