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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:23:16+00:00 2026-05-16T06:23:16+00:00

I have a popover containing a UINavigationController. I can display the popover fine, and

  • 0

I have a popover containing a UINavigationController. I can display the popover fine, and it contains the navController just fine. The navController contains a tableView and when I select an item it creates a new detail view:

     DeviceDetailViewController *detailViewController = 
[[[DeviceDetailViewController alloc] initWithNibName:@"DeviceDetailViewController" bundle:nil] autorelease];

I then push it the new view controller:

    [self.navigationController pushViewController:detailViewController animated:YES];

This is when the problem occurs: after pushing the new view the popover resizes to the maximum height available on the iPad.

I have tried setting the height of all the views in the xib to fixed height rather than flexible. I have tried explicitly setting the height of the popover. I have also tried using different view controllers as the child view. The problem remains: the popover wants to resize itself to max height automatically whenever a new view is pushed to the navigation controller.

Here’s a question which discusses trying to deliberately control the size of the popover when pushing new views:

I thought this might be a brute force method to control the size. Strangely enough, though, it actually causes some quick graphics quirks (as if the view were being freshly animated in) followed by continuing to resize as described above.

In other words, something is literally forcing the popover to its maximum height, and it seems to occur after all delegate methods have been called.

Is it the navigation controller? Has anyone seen this kind of thing?

  • 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-16T06:23:17+00:00Added an answer on May 16, 2026 at 6:23 am

    This fixed it for me after I had the same issue (coincidently also today):

    EDIT : As contentSizeForViewInPopover is deprecated in iOS7.0 so use preferredContentSize.

    Original answer below:

    In your detailViewController add this:

    - (void)viewWillAppear:(BOOL)animated {
    
        CGSize size = CGSizeMake(320, 480); // size of view in popover
        self.contentSizeForViewInPopover = size;
    
        [super viewWillAppear:animated];
    
    }
    

    You also want to add something similar to your original DeviceDetailViewController to prevent resizing when tapping the back NavbarItem.

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

Sidebar

Related Questions

How can I create a popover and fill it with a tableview? I have
I have a problem with the display of my popover. After initWithContentViewController: and presentPopoverFromBarButtonItem:permittedArrowDirections:animated:
I have a popover that contains a UITableView. This UITableView has a cell with
I have a tableview inside a popover in my main view which is a
I have a UINavigationController inside a UITabBarController. I'm presenting a sort of popover view
I am creating a monotouch ipad app. I have a popover with tableview in
Have just started converting an existing job tracking system into an ASP.NET MVC application.
Have just started using Google Chrome , and noticed in parts of our site,
Heey, In my iPad application I have a UIPopoverController with a UIViewController containing some
So I have a popover with a button in it. When that button is

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.