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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:28:04+00:00 2026-05-29T10:28:04+00:00

this may sound simple, but somehow I am not able to get out of

  • 0

this may sound simple, but somehow I am not able to get out of this. I have created an empty app, added two tabBar items by creating them in AppDelegate.h and AppDelegate.m files. Now for my second tabBar item, when the user clicks the second tabBar item I want to display a popOverController. I have programmatically created that, by following this link Link. Now my problem is I want to use Navigation Controller in my code where I have created my popOverController (AppDelegate.m) so that in my popOverController.m, I want to use the NavController to push other views. If someone has a simple way of achieving this, would be appreciated.

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-05-29T10:28:04+00:00Added an answer on May 29, 2026 at 10:28 am

    I am little confused on where your problem is. What your trying to do is possible and should be straight forward. If your problem is that the Next view is not being pushed its because in popoverController you don’t have access to self.navigationController. So easy solution, create a UINavigationController variable and pass navigationController to your popover or use notifications to pass what view to push back to your AppDelegate.

    EDIT

    You can use this to listen for notifications:

    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(popOverViewControllerSelected:) name:@"popOverViewSelectedViewToPush" object:someObjectTellingYouWhatViewToPush];
    

    Then use this to send the notifications:

    [[NSNotificationCenter defaultCenter] postNotificationName:@"popOverViewSelectedViewToPush" object:@"ViewController1"];
    

    The selector would be your function name (I just put a descriptive name “popOverViewControllerSelected”) and the object would need to be information on what viewController to push (i.e. 1,2,3 or @”view1″). Then you would need:

    - (void)popOverViewControllerSelected:(id)sentObject
    {
         // If your passing an NSNumber could use a switch
                     switch ((int)sentObject) {
                case 0:
                    //Push This view
                    break;
                case 1:
                    //Push that view
                    break;
                case 2:
                    //Push someother view
                    break;
                default:
                    break;
            }
    }
    

    The other way I was talking about is in you popOverViewController.h add in

    @interface .........
    {
         UINavigationController *navController;
    }
    @property (nonatomic, retain) UINavigationController *navController;
    

    In you popOverViewController.m add the:

    @synthesize navController;
    

    Then where ever you are adding the popOverViewController just add:

    [popOverViewController setNavController:self.navigationController];
    

    And now in your PopOverViewController you can call:

    [navController pushViewController:someViewController animated:YES];
    

    But I recommend doing the first option.

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

Sidebar

Related Questions

I think this may sound pretty simple, but still I can not get it
Hey this may sound simple but it escapes me, I have a list of
This may sound easy, but please, I am a newbie. I have a simple
This may sound like a very generic question but here it goes. I have
This may sound like a stupid question but I'm a beginner not just to
ok not as simple as title may make it sound. I tried this in
This may sound simple but i am stuck up at a very strange problem.
Hy, i have a big question ... it may sound simple but actually it's
This may sound like a simple question, but I just cannot seem to find
this may sound simple, I have made a div block which consists of buttons

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.