ipup / PPRevealSideViewController

A new container controller to easily push views on side like Path or Facebook
www.ipup.pro
Other
821 stars 194 forks source link

How can I handle gesture using customized UIView instead of Navigation bar? #1

Closed ipeisong closed 12 years ago

ipeisong commented 12 years ago

We do not use standard navigation bar, so is there an option to assign a UIView to handle pan gestures? Thanks.

ipodishima commented 12 years ago

Hi,

I just added some delegate methods to handle this :

- (NSArray*) customViewsToAddPanGestureOnPPRevealSideViewController:(PPRevealSideViewController*)controller;

- (NSArray*) customViewsToAddTapGestureOnPPRevealSideViewController:(PPRevealSideViewController*)controller;

If you don't want to enable panning gestures on content view, do not forget these parameters : panInteractionsWhenClosed and panInteractionsWhenOpened.

You can also use this delegate method if the root controller is not the center controller. You could for example have a root controller acting like an other container controller which view is full screen (or almost, depending of the status bar). In that case, PPRevealSVC would take by default the view of this controller.

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