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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:45:18+00:00 2026-06-06T13:45:18+00:00

I have a UISplitViewController with the master view set up like this: UITabBarController Tab1:

  • 0

I have a UISplitViewController with the master view set up like this:

UITabBarController
  Tab1:
    UINavigationController -> UIViewController -> UIViewController
  Tab2:
    UINavigationController -> UIViewController

Each of the UIViewControllers is a table view, and when the user chooses a row in the last one, an image is shown in the detail view, which contains a UIScrollView.

The tab bar Controller is the UISplitViewControllerDelegate and handles putting up the button on a toolbar at the top of the scroll view.

The problem is, I want to add code to dismiss the popover when the user makes their choice. The pointer to the popover has to be saved in the tab bar controller when the button goes up, and then used to dismiss the popover several view controllers down the line when the user makes their final selection. There doesn’t seem to be any way for the view controller that needs that pointer to get at it, without doing something gross like storing it in the App Delegate.

I don’t see other people asking this question, which leads me to believe that I’ve once again overlooked something simple. Please enlighten me!

  • 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-06T13:45:19+00:00Added an answer on June 6, 2026 at 1:45 pm

    It sounds like your tab bar controller is already a subclass of UITabBarController, which means that you’ve already got some custom code in there. I would suggest that the tab bar controller is the primary owner of the popover, and it is the table view controller’s responsibility to simply notify the tab bar controller that a selection has been made. The tab bar controller can respond to that message by dismissing the popover. You can take advantage of the fact that UIViewController already has a method for accessing the tab bar controller that contains a given controller.

    So it would look something like this:

    @interface MyTabBarController : UITabBarController
    - (void)itemWasSelected;
    @end
    
    @implementation MyTabBarController {
      UIPopoverController *popover;
    }
    
    - (void)itemWasSelected {
      [popover dismissPopoverControllerAnimated:YES];
    }
    @end
    
    //////////////
    
    @implementation TableController
    
    - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)path {
      // Do whatever else you want to do
      MyTabBarController *tabController = (MyTabBarController *)self.tabBarController;
      [tabController itemWasSelected];
    }
    

    With this solution, the table controller doesn’t have to know anything about the popover; it just has to know that it’s going to be presented inside a MyTabBarController, which seems a reasonable thing for it to know.

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

Sidebar

Related Questions

In my iPad application, i have used UISplitViewController where master view contains table view
I have a UISplitViewController with a UIViewController as master and a UINavigationController as my
I have a UISplitViewController that is set up like so: -(IBAction)makeStory:(id)sender{ NSLog(@makeStory:); makeStoryTableViewController =
I have a UISplitViewController, and I'd like to change the root view controller (on
I have a UISplitViewController with a Table View for navigation. It's similar to the
I have this button on the leftside of my UISplitViewController (RootViewController) that has a
I have a UISplitViewController setup with a custom view added as a subview of
I have the following setup: A subclass of UISplitViewController that creates the master and
I have an UISplitViewController base project. I want to have a different detail View
I have a UISplitViewController containing a UINavigationController on the left hand side and another

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.