Max
Max

Reputation: 326

SWRevealViewController opening method

I am currently using SWRevealViewController to have a left menu.

I would like to know when the user is showing/closing it by dragging but I can't find any method to perform that.

Upvotes: 0

Views: 65

Answers (1)

Guillaume Algis
Guillaume Algis

Reputation: 11016

Take a look at these two methods in SWRevealViewControllerDelegate:

// The following delegate methods will be called before and after the front view moves to a position
- (void)revealController:(SWRevealViewController *)revealController willMoveToPosition:(FrontViewPosition)position;
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position;

These should provide sufficient information to determine when the user started opening or closing the menu, and when the interaction ended.

Upvotes: 1

Related Questions