I have a simple iPad app with MasterviewController with a tableview and and a DetailViewController containing a UIWebView. Then i dragged and dropped a SplitViewController in my Storyboard, connected it with my Master and Detail controllers. In MasterViewController i am using the following:
- (void) awakeFromNib
{
self.splitViewController.delegate = self;
}
- (BOOL) splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation
{
return NO;
}
It currently looks like the following:
Everything is working great. What i want to do is to hide and unhide the MasterViewController with a button at the top left side of DetailViewController, just like the iPad Mail app.
I have found some questions related to this problem but they are not creating the SplitView as simply as i am by just dragging it in the Storyboard and writing few lines of code, So don't mark it as duplicate or something like that.
NOTE: Kindly do not suggest using MGSplitViewController or any other third party library. Thanks in advance.
The MasterViewController is embedded inside a navigation controller. While DetailViewController has a top bar manually added on it because it looses the navigation bar at top when the whole things is added in the SplitView. What i know is that i can create an IBAction button on the top bar of DetailView but dont know how to trigger the hide and unhide functionality.