http://mattgemmell.com/2010/07/31/mgsplitviewcontroller-for-ipad
https://github.com/mattgemmell/MGSplitViewController
Features
Please note that, since split-views are commonly used for “Master-Detail”
interfaces, I call the first sub-view the “master” and the second
sub-view the “detail”.
� By default, MGSplitViewController mimics the appearance and (complete) behaviour of
UISplitViewController, including its delegate API. It accepts two UIViewControllers (or
subclasses thereof).
� Allows toggling the visibility of the master view in either interface-orientation; i.e. you
can have master-detail or detail-only in either landscape and/or portrait orientations
(independently, and/or interactively).
� Allows choosing whether the split orientation is vertical (i.e. left/right, like
UISplitViewController), or horizontal (master above, and detail below). You can toggle
between modes interactively, with animation.
� Allows choosing whether the master view is before (above, or to left of) the detail view,
or after it (below, or to the right).
� Allows you to choose (and change) the position of the split, i.e. the relative sizes of the
master and detail views.
� Allows you to enable dragging of the split/divider between the master and detail views,
with optional constraining via a delegate method.
� Allows you to choose the width of the split between the master and detail views.
� Preset “divider styles“: one for non-draggable UISplitViewController-like dividers, and
one for draggable, thicker style with a grip-strip.
� Allows you to substitute your own divider-view (an MGSplitDividerView subclass), used
to draw the split between the master and detail views.
Getting the Code
MGSplitViewController is hosted on github, for ease of sharing; you can
get the code here.
If you find it useful, it’d be much appreciated if you leave a comment
to that effect here, and (ahem) note the Donations section above. Relax,
that’s the last time I’ll mention it.
How to use