MWFSlideNavigationViewController Class Reference
| Inherits from | UIViewController |
| Conforms to | UIGestureRecognizerDelegate |
| Declared in | MWFSlideNavigationViewController.h MWFSlideNavigationViewController.m |
Overview
The MWFSlideNavigationViewController is a container view controller implementation
that manages a primary and secondary view controller.
Primary view controller is basically the root view controller provided during the class
initialization using [MWFSlideNavigationViewController initWithRootViewController:] method.
The primary/root view fills the whole of MWFSlideNavigationViewController view area.
Secondary view controller is the ‘hidden’ beneath the primary/root view.
It is revealed by sliding the primary/root view in one of the 4 directions supported (MWFSlideDirectionUp, MWFSlideDirectionLeft, MWFSlideDirectionDown or MWFSlideDirectionRight),
using [MWFSlideNavigationViewController slideForViewController:direction:portraitOrientationDistance:landscapeOrientationDistance:] method.
The same method is used to slide the primary/root view back, by specifying MWFSlideDirectionNone as the slide direction.
This view controller notifies its delegate in response to the sliding event. The delegate is a custom object provided by your application that conforms to the MWFSlideNavigationViewControllerDelegate protocol. You can use the callback methods to perform additional setup or cleanup tasks.
Important: When not showing, secondary view controller is removed from slide navigation controller and not retained. It’s the responsibilty of application to retain it if needed.
Tasks
-
delegateThe receiver’s delegate or
propertynilif it doesn’t have a delegate. -
dataSourceThe receiver’s dataSource or
propertynilif it doesn’t have a dataSource. -
rootViewControllerThe root view controller.
property -
currentSlideDirectionThe current slide direction.
property -
currentPortraitOrientationDistanceThe current portrait orientation slide distance.
property -
currentLandscapeOrientationDistanceThe current landscape orientation slide distance.
property -
panEnabledEnable panning
property -
– initWithRootViewController:Initializes and returns a newly created slide navigation view controller.
-
– slideForViewController:direction:portraitOrientationDistance:landscapeOrientationDistance:Perform slide animation that reveals/hides the specified
viewController. If the direction isMWFSlideDirectionNone, the values provided forviewControllerand distances are ignored, it’s advised to just specify nil forviewControllerand 0 for distances. -
– slideWithDirection:Perform slide animation with specified direction. The receiver will request view controller to be revealed from its
dataSourceand slide distance from itsdelegate.
Properties
currentLandscapeOrientationDistance
The current landscape orientation slide distance.
@property (nonatomic, readonly) NSInteger currentLandscapeOrientationDistanceDiscussion
The current landscape orientation slide distance.
Declared In
MWFSlideNavigationViewController.hcurrentPortraitOrientationDistance
The current portrait orientation slide distance.
@property (nonatomic, readonly) NSInteger currentPortraitOrientationDistanceDiscussion
The current portrait orientation slide distance.
Declared In
MWFSlideNavigationViewController.hcurrentSlideDirection
The current slide direction.
@property (nonatomic, readonly) MWFSlideDirection currentSlideDirectionDiscussion
The current slide direction.
Declared In
MWFSlideNavigationViewController.hdataSource
The receiver’s dataSource or nil if it doesn’t have a dataSource.
@property (nonatomic, weak) id<MWFSlideNavigationViewControllerDataSource> dataSourceDiscussion
The receiver’s dataSource or nil if it doesn’t have a dataSource.
Declared In
MWFSlideNavigationViewController.hdelegate
@property (nonatomic, weak) id<MWFSlideNavigationViewControllerDelegate> delegateDeclared In
MWFSlideNavigationViewController.hInstance Methods
initWithRootViewController:
Initializes and returns a newly created slide navigation view controller.
- (id)initWithRootViewController:(UIViewController *)rootViewControllerParameters
- rootViewController
The primary view controller
Return Value
The initialized slide navigation view controller or nil if there was problem initializing the object.
Discussion
Initializes and returns a newly created slide navigation view controller.
Even it’s not mandatory, each slide navigation controller should have a root view controller as its primary view controller.
Declared In
MWFSlideNavigationViewController.hslideForViewController:direction:portraitOrientationDistance:landscapeOrientationDistance:
Perform slide animation that reveals/hides the specified viewController. If the direction is MWFSlideDirectionNone, the values provided for viewController and distances are ignored, it’s advised to just specify nil for viewController and 0 for distances.
- (void)slideForViewController:(UIViewController *)viewController direction:(MWFSlideDirection)direction portraitOrientationDistance:(CGFloat)portraitOrientationDistance landscapeOrientationDistance:(CGFloat)landscapeOrientationDistanceParameters
- viewController
The secondary view controller or
nilif direction isMWFSlideDirectionNone.
- direction
The slide direction:
MWFSlideDirectionUp,MWFSlideDirectionLeft,MWFSlideDirectionDown,MWFSlideDirectionRightorMWFSlideDirectionNone.
- portraitOrientationDistance
The distance of slide when in portrait orientation.
- landscapeOrientationDistance
The distance of slide when in landscape orientation.
Discussion
Perform slide animation that reveals/hides the specified viewController. If the direction is MWFSlideDirectionNone, the values provided for viewController and distances are ignored, it’s advised to just specify nil for viewController and 0 for distances.
Declared In
MWFSlideNavigationViewController.hslideWithDirection:
Perform slide animation with specified direction.
The receiver will request view controller to be revealed from its dataSource and slide distance from its delegate.
- (void)slideWithDirection:(MWFSlideDirection)directionParameters
- direction
The slide direction.
Discussion
Perform slide animation with specified direction.
The receiver will request view controller to be revealed from its dataSource and slide distance from its delegate.
Declared In
MWFSlideNavigationViewController.h