Conforms to NSObject
Declared in PPRevealSideViewController.h

Tasks

Instance Methods

controllerForGesturesOnPPRevealSideViewController:

Implement this method if you have for example a container as the rootViewController (like UITabBarController). If you do not implement this method, the gestures are added to the RootViewController (the center view controller)

- (UIViewController *)controllerForGesturesOnPPRevealSideViewController:(PPRevealSideViewController *)controller

Parameters

controller

The reveal side view controller

Return Value

the controller in which we will add gestures

Declared In

PPRevealSideViewController.h

pprevealSideViewController:didChangeCenterController:

Called when the center controller has changed

- (void)pprevealSideViewController:(PPRevealSideViewController *)controller didChangeCenterController:(UIViewController *)newCenterController

Parameters

controller

The reveal side view controller

newCenterController

The new center controller

Declared In

PPRevealSideViewController.h

pprevealSideViewController:didPopToController:

Called when a controller has been poped

- (void)pprevealSideViewController:(PPRevealSideViewController *)controller didPopToController:(UIViewController *)centerController

Parameters

controller

The reveal side view controller

centerController

The center controller poped

Declared In

PPRevealSideViewController.h

pprevealSideViewController:didPushController:

Called when a controller has been pushed

- (void)pprevealSideViewController:(PPRevealSideViewController *)controller didPushController:(UIViewController *)pushedController

Parameters

controller

The reveal side view controller

pushedController

The controller pushed

Declared In

PPRevealSideViewController.h

pprevealSideViewController:directionsAllowedForPanningOnView:

Called when a gesture will start

- (PPRevealSideDirection)pprevealSideViewController:(PPRevealSideViewController *)controller directionsAllowedForPanningOnView:(UIView *)view

Parameters

controller

The reveal side view controller

view

The view

Return Value

Return directions allowed for panning

Discussion

You could need to deactivate gesture for specific direction on a web view for example. If your web view fits the screen on width, then you probably want to deactivate gestures on top and bottom. In this case, you can do

- (PPRevealSideDirection)pprevealSideViewController:(PPRevealSideViewController*)controller directionsAllowedForPanningOnView:(UIView*)view {

    if ([view isKindOfClass:NSClassFromString(@"UIWebBrowserView")]) return PPRevealSideDirectionLeft | PPRevealSideDirectionRight;

    return PPRevealSideDirectionLeft | PPRevealSideDirectionRight | PPRevealSideDirectionTop | PPRevealSideDirectionBottom;
}

Declared In

PPRevealSideViewController.h

pprevealSideViewController:shouldDeactivateGesture:forView:

Called when a gesture will start. Typically, if you would use a class like the UISlider (handled by default in the class), you don’t want to activate the pan gesture on the slider since it will not be functional.

- (BOOL)pprevealSideViewController:(PPRevealSideViewController *)controller shouldDeactivateGesture:(UIGestureRecognizer *)gesture forView:(UIView *)view

Parameters

controller

The reveal side view controller

gesture

The gesture which triggered the event

view

The view

Return Value

Return YES or NO for the view you want to deactivate gesture. Please return NO by default.

Declared In

PPRevealSideViewController.h

pprevealSideViewController:willPopToController:

Called when a controller will be poped

- (void)pprevealSideViewController:(PPRevealSideViewController *)controller willPopToController:(UIViewController *)centerController

Parameters

controller

The reveal side view controller

centerController

The center controller poped

Declared In

PPRevealSideViewController.h

pprevealSideViewController:willPushController:

Called when a controller will be pushed

- (void)pprevealSideViewController:(PPRevealSideViewController *)controller willPushController:(UIViewController *)pushedController

Parameters

controller

The reveal side view controller

pushedController

The controller pushed

Declared In

PPRevealSideViewController.h