I have created a new split view based project in my XCode 4.2
Then in DetailViewController.m
file i have add this method
- (BOOL)splitViewController: (UISplitViewController*)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation { //This method is only available in iOS5 return NO; }
Now by doing this i can able to show both left & right part of my splitview Controller at a time.
Now i have added a UIBarButtonItem
in my DetailViewController
Navigation bar and i want by using which i can hide & show my Master View both in Portrairt and Landscape Mode.
- (IBAction)hideUnhide:(id)sender { //How can hide & unhide }
How can i do this?
Your ability to hide will depend in part based on how much someone (if anyone) wants to find you. If you're trying to hide because you're in danger, it is strongly recommended that you find a way to leave the area as fast as possible. Get help if it's available.
Click “OK” to save your changes, and the Folder Options window will close. Go to your desktop and find the icon that you want to hide. Right-click it and select “Properties.” In the Properties window, click the “General” tab and then locate the “Attributes” section near the bottom of the window. Place a check mark beside “Hidden.”
As soon as you decide on a hiding spot, crouch, stoop, or sit down and draw your arms and legs in. If you’re tucked away in a narrow space, stand up straight and put your arms down at your sides. The less room you take up, the harder you’ll be to see.
The shortcut to hide a column is Ctrl + 0. This article must be helpful to understand the hide column in Excel, with its formula and examples. You can download the template here to use it instantly.
instead spv.delegate=nil; spv.delegate=self;
you need to do next:
[spv willRotateToInterfaceOrientation:self.interfaceOrientation duration:0];
'setNeedsLayout' makes UISplitViewController to ask for "shouldHideViewController"
- (IBAction)hideUnhide:(id)sender { UISplitViewController* spv = ...; self.hideMaster= !self.hideMaster; [ spv.view setNeedsLayout ] }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With