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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:24:21+00:00 2026-06-16T19:24:21+00:00

I am writing an iPad app which features UITableViews displayed under a Navigation Controller

  • 0

I am writing an iPad app which features UITableViews displayed under a Navigation Controller within a UIPopoverController.

The popover is displayed when I pick a button in the Main View Controller of my app. The popover opens displaying a first TableViewController, which has two rows (UITableViewCells) – “Search” in the first row and “Advanced Settings” in the second row. On initial display, the popover is sized just enough to display the two rows.

I have coded this first TableViewController’s didSelectRowAtIndexPath such that when I pick “Search”, it pushes a second TableViewController onto the NavigationViewController. This next View Controller allows the user to perform a search, and search results then get populated in its tableview.) This (search results) table view controller is sized long enough to accommodate all the rows returned by the search. The search popover therefore becomes longer when displaying the search tableview controller.

When I cancel the search (or hit the back button in the navigation bar) the popover returns to displaying the first table view controller (the one with just two rows). However this first table view controller now has the longer size. In other words, the popover, instead of resizing itself back to a two row table, remains the size of the second (search results) table view controller (so it now has the two rows “Search” and “Advanced Settings” plus a number of empty rows)

My question is: how can I get each tableview controller in the hierarchy in this implementation (i.e. where table view controllers are displayed in a popover under a navigation controller) to be sized individually and to return to its original size when the user navigates back and forward. There is probably a simple solution to this, but it escapes me! Appreciate if someone can point me to a solution.

  • 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-06-16T19:24:22+00:00Added an answer on June 16, 2026 at 7:24 pm

    I implemented the answer from the following StackOverflow post by user @krasnyk :

    Popover with embedded navigation controller doesn't respect size on back nav

    It worked great for me with one change …

    Basically added the same function detailed in the above post with one modification (I hardcoded the size for each VC in my view heirarchy in the PopupController)

    I referenced this function to set the correct popover size in the ViewDidLoad and ViewDidAppear functions for each VC in the chain of VCs displayed in my PopoverController.

    - (void) correctPopoverContentSize {
        //
        // removed the following line from the original code in above post as it did not
        // work for me 
        //      CGSize currentSetSizeForPopover = self.contentSizeForViewInPopover; 
    
        CGSize currentSetSizeForPopover = CGSizeMake(320.0f, 180.0f);
        CGSize fakeMomentarySize = CGSizeMake(currentSetSizeForPopover.width - 1.0f,    
               currentSetSizeForPopover.height - 1.0f);
        self.contentSizeForViewInPopover = fakeMomentarySize;
        self.contentSizeForViewInPopover = currentSetSizeForPopover;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For the iPad app I am writing I want a style of popover that
I have an iPad app for which I'm writing an UIAutomation script. There's an
I am writing an iPad app in which I am rendering XML objects that
I am writing an iPhone/iPad app where I have zipped files come in which
BackStory I am writing an ipad app which has images that scrolls horizontally using
I'm writing an Android app which does exactly the same as our iPad app
I am writing an iPad app that has a Cancel button on a view
I'm writing a web app for the iPad ( not a regular App Store
I am writing an app for the iPhone and iPad and I need it
I'm writing a VOIP app for iPad (currently targeting 2&3). I originally wrote the

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.