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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:15:00+00:00 2026-05-26T23:15:00+00:00

As title said, I want to show another UIViewController from an existing UIViewController which

  • 0

As title said, I want to show another UIViewController from an existing UIViewController which is hosted in UIPopoverController. I tried the following method:

_secondViewController = new SecondViewController();
this.ModalPresentationStyle = UIModelPresentationStyle.CurrentContext;
this.ModelInPopover = true;
this.PresentModelViewController(_secondViewController, true);

However, the secondViewController is shown in the main view controller, instead of the popover controller.

In this post somebody mentions that it cannot be done and it violates the HIG. However, I have seen this in other apps (e.g. Yahoo! Email) if I’m not mistaken.

I’m also thinking about another approach: If I could create a UINavigationController within the popover context, it might work by just adding new ViewController to the NavigationController. But how?

  • 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-26T23:15:00+00:00Added an answer on May 26, 2026 at 11:15 pm

    Remember that UINavigationController derives from UIViewController.

    So, you can use the controller contained within UIPopover just like any other container… in this case it’s best to use UINavigationController inside UIPopover to display ViewControllers.

    Usage:

    var _NavController = new NavController();
    
    Popover = new UIPopoverController(_NavController);
    Popover.PopoverContentSize = new SizeF(..., ...);
    
    Popover.PresentFromRect(...);
    

    NavController:

    public class NavController : UINavigationController
    {
        UIViewController _FirstViewController; 
        UIViewController _SecondViewController;
    
        public NavController()
            : base()
        {
        }
    
        public override void LoadView()
        {
            base.LoadView();
    
            _FirstViewController = new UIViewController();
    
            // Initialize your originating View Controller here.
            // Only view related init goes here, do everything else in ViewDidLoad()
        }
    
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
    
            // When a button inside the first ViewController is clicked
            // The Second ViewController is shown in the stack.
    
            _FirstViewController.NavButton.TouchUpInside += delegate {
                PushSecondViewController(); 
            };
    
            this.PushViewController(_FirstViewController, true);
        }
    
        public void PushSecondViewController()
        {
            _SecondViewController = new UIViewController();
            this.PushViewController(_SecondViewController, true);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

all is said in the title, I want to get from an element all
Title says it mostly. I want to add a simple extension method to the
I want a program that does what I said in the title. I realize
As said in the in the title, I want to change default error pages
As the title said, I want to debug some Core Data bugs. Instead of
As the title said, I need to raise (from the C# code behind a
As title said, I want to use python_ldap to get user's password. Here is
As said in title I'm SL developer and want to learn ruby and after
As said in the title i want to stop Hibernate console output, without using
Title said it all. Some context: I got a search mechanism - search view,

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.