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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:10:17+00:00 2026-06-13T05:10:17+00:00

NOTE: Before reading this question please note that I have read the previous questions

  • 0

NOTE:
Before reading this question please note that I have read the previous questions that explain the deficiencies regarding apple’s implementation of UISplitViewController and how I should use the open-sourced “MGSplitViewController” because its not too easy to simply hide the master view controller on a split view controller in landscape-mode. Please keep in my mind that I’m limited to using the normal UISplitViewController in iOS 5.1.

Now onto the question:

I have a split view controller with table views on the left side (master view) and a detail view controller on the right. I’m using a navigation controller to control the left side which is a table view that transitions onto another table view (“DataTableViewController”). In order to hide this left side, I have placed a “hide” button on the navigation tool bar of the detail view controller. When the hide button is pressed, I change my “_hideMaster” property:

-(IBAction)hidePressed
{
    _hideMaster = !_hideMaster;
    // Must manually reset the delegate back to self in order to force call "shouldHideViewController"
    self.splitViewController.delegate = nil;
    self.spliteViewController.delegate = self;

}

and then automatically this method is called in the SplitViewController delegate:

// This is called when I change the delegate from nil back to self.
- (BOOL)splitViewController: (UISplitViewController*)svc shouldHideViewController: (UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation 
{
    return _hideMaster;
}

When I debug it, I can see that everything goes according to plan and the property has the correct value when it enters the method splitViewController:shouldHideViewController:inOrientation:

The only problem is that nothing happens. My left most table view (DataTableViewController) does not disappear. When I look closer, the (UIViewController *)vc parameter in the delegate method is not the table view controller that I want to hide but instead the navigation controller associated with this table view. So essentially it is trying to hide the navigation controller – which is clearly not what I want…

How can I make it so that the UIViewController parameter in the automatically called delegate method (shouldHideViewController:) calls the topmost view controller associated with that navigation controller? (After all, I want to hide DataTableViewController)

  • 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-13T05:10:18+00:00Added an answer on June 13, 2026 at 5:10 am

    Here’s how I handle it. Might need more work for making the MasterViewController reappear if it is not instantiated on the way back.

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.30f];
    [[self.splitViewController.viewControllers lastObject] view].frame = self.splitViewController.view.frame;
    [UIView commitAnimations];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before reading please note that I've googled this and read a ton of articles
Note: Before reading this question and its answer, please check your input element has
Please note that this is not homework and i did search before starting this
NOTE: This is a followup to my question here. I have a program that
Before reading, please note that I am very new to both PHP and MYSQL.
NOTE : Right before posting this question it occurred to me there's a better
Note this question was originally posted in 2009, before C++11 was ratified and before
Note, this is not a duplicate of .prop() vs .attr() ; that question refers
After reading this question , I've learned that denormalization is not a solution for
Reading this question I found this as (note the quotation marks) code to solve

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.