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

The Archive Base Latest Questions

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

When click button, a popoverView embedded in NavigationView appear. My code is as follows:

  • 0

When click button, a popoverView embedded in NavigationView appear.
My code is as follows:

  -(IBAction)myStuffPOP:(id)sender
   {
    if(myStuffListViewController ==nil)
    {        
        myStuffListViewController = [[MyStuffListViewController alloc] init]; 
    }
    UINavigationController *navcontroller=[[[UINavigationController alloc] initWithRootViewController:myStuffListViewController] autorelease];
 // Here we create popover controller.
    mystuffPopoverView =  [[UIPopoverController alloc] initWithContentViewController:navcontroller] ;
    CGRect popoverRect = [self.view convertRect:[sender frame] fromView:[sender superview]];

    popoverRect.size.width = MIN(popoverRect.size.width, 100);
    popoverRect.size.height = 40;

    [mystuffPopoverView presentPopoverFromRect:popoverRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

    [navcontroller setNavigationBarHidden:NO];

} 

In NavigationView of PopoverView :

1st subView ---> 2nd SubView ---> 3rd Subview

If I touch 3rd SubView, PopoverView disappears.

My Question is :

When I click button again, I wanna to see lastest View – 3rd SubView not 1st SubView.

  • 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:22:27+00:00Added an answer on May 27, 2026 at 12:22 am
    1. Declare UINavigationController *navcontroller; in .h file
    2. Create only onсe navcontroller with your root view controller,
      in viewDidLoad method, for example.

      - (void)viewDidLoad {     
          myStuffListViewController = [[MyStuffListViewController alloc] init]; 
          navcontroller=[[UINavigationController alloc] initWithRootViewController:myStuffListViewController]; }
      
    3. Show UIPopoverController with exist navigation stack

      -(IBAction)myStuffPOP:(id)sender    {
          //Here we create popover controller.
          mystuffPopoverView =  [[UIPopoverController alloc] initWithContentViewController:navcontroller] ;
          CGRect popoverRect = [self.view convertRect:[sender frame] fromView:[sender superview]];
      
          popoverRect.size.width = MIN(popoverRect.size.width, 100);
          popoverRect.size.height = 40;
      
          [mystuffPopoverView presentPopoverFromRect:popoverRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp
      animated:YES];
          [navcontroller setNavigationBarHidden:NO]; }
      
    4. Don’t forget to release objects

      - (void)dealloc {   
          [myStuffListViewController release];
          [navcontroller release];
      }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to click Button from code. I am tying to do the
I have this click button code \$(#extractmonkeys).click(function () { \$(#grapharea).html( ); \$(#paramselection).html( ); How
Hello guys I have 1675 line Code. Want to when user click button textbox.text
I have some Backbone.js code that bind a click event to a button, and
I placed 1 UIButton on nib, and when user click this button,an IBAction method
Currently how my code works is I click button 1 and it generates a
I am easily changing the color of polyline on click button my code below,
I am trying to use some action when I click button in navigation controller.
I have form area in my view. If I click button A , I
When click a button,I want to popup a view form bottom,like this! Any help

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.