UISplitViewController - Use as slideout-style menu - ios

I'm struggling a bit with the new UISplitViewController in iOS 8.
I want to achieve a slideout-style menu on iPhone (landscape and portrait) as well as on iPad in portrait orientation and a persistent sidebar on iPad in landscape orientation.
I got a UITableViewController as the master and a UINavigationController with a couple of UIViewControllers as the detail in my SplitViewController.
Is it possible to to get something like this with the new UISplitViewController in iOS 8?
First it would be enough the get the iphone sliding thing to run :D
Thank you :)

The UISplitViewController will do just that. Sliding menus and everything.
It works like a dream if you use it exactly by the book. And this requires setup of some UINavigationControllers as part of the magic.
Tutorial is highly recommended for the first time. It's easy to get it messed up quickly otherwise. :)
http://nshipster.com/uisplitviewcontroller/

By default, the UISplitViewController in iOS8 will only act as a slideout-style menu on the iPad (in both portrait and landscape mode) and iPhone 6+ (in landscape mode only).
As to whether or not it is possible to get the slideout-style menu working on all iphones via the splitViewController, I don't actually know (I'm still new to iOS development). I suspect that it entails modifying how the splitViewController treats different size classes. If there isn't an easy way to change the splitViewController's behavior, perhaps you could subclass the splitViewController and override the functionality that you do not like.
I have not tried this before, nor do I actually know how the controller determines how it is displayed in different size classes. However, if I were trying to accomplish what you are, then this is what I would be looking up.

Related

Is there a way to get slide-in menu in ios app while using iPad on the landscape mode?

Currently I am calling a popover segue to the menu which does not be slid-in or out with swiping action.
We're currently using https://github.com/ECSlidingViewController/ECSlidingViewController, there are some other libarries that we've tried but this one works best on various screen sizes and both portrait/landscape modes. It is pretty easy to customize the transitions too.

Appropriate way to manage different views for portrait and landscape?

I'm developing an app targeting iOS 7 and above. I'm using storyboard and autolayout, and I have to show different layouts of each storyboard scene depending on the device orientation, I mean, for example: in portrait I may have a button at a certain place that has to be shown in another place in landscape, or I may have controls in portrait that should disappear in landscape and have to rearrange the rest of controls.
My question is: when there are a lot of differences between portrait and landscape, should it be better to manage all this changes by programmatically updating constraints, or should it be better to create different nib files and load the corresponding according to the orientation?
use size classes their will be no problem in giving support to ios7 . I have tested their were no major problems in ios7 while using size classes.

Landscape-only IPad App With UISplitViewController

I am almost done developing an app. Right now I'm converting it to a universal app by supporting iPad to supported devices as well.
Can I set the app to use Landscape orientation only, since I am using UISplitViewController and want the Master View Controller to remain on the screen all the time? Is there any Apple policy that states that I cannot restrict it to Landscape only and I have to implement both portrait and landscape? Is there any chance my app can be rejected by setting it to Landscape only for iPad?
Don't worry, you'll be fine. Support both landscape orientations and neither portrait orientation if you want. I've got apps in the store that are like that.
However, note that UISplitViewController does have an option to keep both views on the screen all the time even in portrait. Use the delegate method splitViewController:shouldHideViewController:inOrientation: to forbid hiding the master view:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UISplitViewControllerDelegate_protocol/Reference/Reference.html#//apple_ref/occ/intf/UISplitViewControllerDelegate
So if your only reason for being landscape only is that you don't want to hide the master view, it is a false reason. Look, for example, at Apple's Settings app, which works like that; it is a split view controller that always shows both views in all four orientations.

XCode Storyboard - View appearing in Landscape?

Building an application which started as fairly simple, but now got pretty complicated. I am facing a strange problem. I am now using only storyboards to define all of my views. The problem I am facing is, some view-controllers in storyboard are appearing in Landscape mode and others in Portrait mode.
I know it won't make a difference in final application, but it is making it hard for me to design and visualize things. Has someone else faced this problem?
Click on the view in storyboards , click on the attributes inspector (third from the top left) in simulated metrics change the orientation to portrait

Landscape orientation for iPad?

Frustrated by how simple this should be...
I'm trying to add landscape support to an existing iPad app of mine. Do I actually have to create a completely new view controller for landscape mode? (surely not as that is a complete pain!)? Or can I use the existing view controllers and design for landscape and portrait? The simulated metrics thing doesn't work because whenever I make changes in a view controller in landscape mode and switch back to portrait it messes everything up! I know how to switch the view to landscape programmatically, this is (at least i think) an 'interface builder' sort of issue.
Why is this so difficult to do/hard to find!? Might be worth mentioning I'm using Xcode 4.2 with storyboards rather than separate xibs. Surely I don't have to use a separate view and segues because I really can't be bothered wasting my time with that.
Any help would be nice! Thanks
Watch for -willRotateToInterfaceOrientation:duration: and change the frame of your interface elements when the rotation changes.

Resources