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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:19:17+00:00 2026-06-03T05:19:17+00:00

In an iPad App i’m using the UISplitViewController. I need to force to show

  • 0

In an iPad App i’m using the UISplitViewController.
I need to force to show the master popover when the app launch in portrait mode.

Now I’m using this code and it works well on iOS 5.0.

if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
   if ([[[AppDelegate sharedAppDelegate] splitViewController] respondsToSelector:[[[AppDelegate sharedAppDelegate] btnMenu] action]]) {
      [[[AppDelegate sharedAppDelegate] splitViewController] performSelector:[[[AppDelegate sharedAppDelegate] btnMenu] action]];
   }            
}

But in iOS 5.1 (with the new type of master popover) the behaviour seems to be random.
Sometimes the popover shows in fullscreen and sometimes works well.

Some suggestion for 5.1?

  • 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-03T05:19:19+00:00Added an answer on June 3, 2026 at 5:19 am

    I struggled with this one for a while, and even now I’m not 100% happy with the solution, but it is the only thing I’ve been able to come up with, given the current constraints.

    First, override the following delegate method:

    - (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController
    

    and use it to grab a reference to the bar button item, and store it in an iVar:

    barButtonForMaster = barButtonItem;
    

    Then, when you want to show the master view controller, make a call like this:

    [barButtonForMaster.target performSelector: barButtonForMaster.action withObject: barButtonForMaster];
    

    In case you want to perform this right at the start, then use some delay in order to prevent app crashing (thanks to the helpful comment):

    [barButtonForMaster.target performSelector: barButtonForMaster.action withObject: barButtonForMaster afterDelay:1];
    

    In that case you can perform the selector right in the split view delegate method.

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

Sidebar

Related Questions

In ipad app I want to set UISplitViewController method set in portrait mode.(i.e Like
In my iPad App, I am using AQGridView. This app is all about matching
I have set my iPad app to Landscape mode using following code.. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
I have created an iPad app, using UIPageviewController in Xcode 4.2 (iOS 5). Now,
In an iPad app, I'm using a custom subclass of UIView with UIViewController. Here's
I've got an iPad app with a drawer table displayed in a popover. The
I am doing an iPad app based on a UISplitViewController. I have a little
My iPad app has a navigation where I show screenshots of the different pages
My iPad app uses a popover to perform some searching. The search results are
My ipad app is working correctly, the only problem is with launch image. i

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.