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

When using a UISplitViewController in portrait , I have a settings popover that I
I have a UITableview inside a popover. Initially the popover is displayed in portrait
I have a UITableView within a navigation controller shown within a popover. When you
I have a pop over view. When this popover gets dismissed, I want to
I have a tabbar app, and I want a popover to come from one
How do you dismiss a popover from within a navigation stack. I have a
I have a UITabBarController inside a UIPopoverController, which I am displaying solely from one
I have assigned the uipopover to a horizontally moving object. So when I keeps
We have common views that we use in our application in many locations inside
I have a UIPopoverController which loads with a custom controller which is a subclass

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.