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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:05:07+00:00 2026-06-09T06:05:07+00:00

I have an iPad SplitViewController application in which I hide the left pane in

  • 0

I have an iPad SplitViewController application in which I hide the left pane in both portrait and landscape modes. I need to show the left pane in its popover when a certain notification is received by the application. Despite experimenting with a number of different suggested solutions I am struggling to work out how to achieve this.

I am using a MultipleMasterDetailManager implementation that includes the following code:

/* forward the message to the current detail view
 * all detail views must implement UISplitViewControllerDelegate
 */
-(void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc
{
    self.masterBarButtonItem = barButtonItem;
    self.masterPopoverController = pc;

    barButtonItem.title = NSLocalizedString(@"Show Sidebar", @"Show Sidebar");

    [self.currentDetailController.navigationItem setLeftBarButtonItem:self.masterBarButtonItem animated:YES];
}

/* forward the message to the current detail view
 * all detail views must implement UISplitViewControllerDelegate
 */
-(void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
{
    //if (![self.currentDetailController isKindOfClass:[SyncSourceDetailViewController class]])
    //{
        self.masterBarButtonItem = nil;
        self.masterPopoverController = nil;

        [self.currentDetailController.navigationItem setLeftBarButtonItem:nil animated:YES];    
    //}    
}

Similar methods exist in the detail view controllers themselves.

The method that I’m calling when the notification is received is as follows:

- (void)navigateToLatest 
{   
        [self navigateToDocumentsTab];  
        [[self dataLoader] navigateToLatest];  // populates data for the left table view 
        UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
        UIView *view = [[[[[splitViewController viewControllers] objectAtIndex:1] viewControllers] objectAtIndex:0] view];  

        [self.masterDetailManager.masterPopoverController presentPopoverFromRect:CGRectMake(0, 0, 100, 100) inView:view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}

This does not work. I’ve also tried using the presentPopoverFromBarButtonItem method but I cannot seem to locate the leftBarButtonItem in code.

Maybe I am going about this completely the wrong way.

  • 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-09T06:05:09+00:00Added an answer on June 9, 2026 at 6:05 am

    I ended up solving this problem by setting a “showSidebar” variable in my app delegate to true in the navigateToLatest method. Then in my DetailViewController’s ViewDidAppear event I check the value of this variable, if it is true then I show the sidebar using the following code:

    UIPopoverController *masterPopoverController= [[theAppDelegate masterDetailManager] masterPopoverController];
            [masterPopoverController presentPopoverFromBarButtonItem:[self.navigationItem leftBarButtonItem] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
            [theAppDelegate setShowSidebar:NO];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad application with a SplitViewController. I am hiding the left hand
I have an iPad application which has many categorized images I need to switch
I have an iPad application which connects to a web server. I need to
I have an iPad application with a SplitViewController in which the DetailView has a
I have an iPad application that pulls in all of its data from an
I have a SplitViewController (iPad) and its leftViewController is a class inherited from UITableViewController;
I have an ipad app which takes images from Photos application using ALAssetsLibrary and
I have an iPad application with a simple tab bar. I need to fix
I have a IPad application in which I add MKMapView programmatically without using the
I have an iPad app which is for both iOS 4 and iOS 5.

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.