I am googling from a long time, but not get the solution, In iOS 5.1 Master View Comes on right swipe, and disappear on left swipe.
I wants load master view on button click of Detail view, How it is possible?
below code is worked for me, Master view hide, but a black screen size of Master view remain in place of Master view.
- (void)hideMaster:(BOOL)hide {
AppDelegate *appDelegate=(AppDelegate *)[[UIApplication sharedApplication] delegate];
UISplitViewController* spv = appDelegate.splitViewController;
spv.delegate=self;
self.hiddenMaster= hide;
[spv willRotateToInterfaceOrientation:self.interfaceOrientation duration:0];
[spv.view setNeedsLayout];
}
- (BOOL)splitViewController:(UISplitViewController*)svc shouldHideViewController: (UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation {
NSLog(@"Spv: I do %@show the master", (self.hiddenMaster?@"not ":@""));
return self.hiddenMaster;
}
Thanks in advance