ECSlidingViewController has methods for this: anchorTopViewToRightAnimated:
, anchorTopViewToLeftAnimated:
and resetTopViewAnimated:
.
Example in your top view controller:
[self.slidingViewController anchorTopViewToRightAnimated:YES]
ECSlidingViewController provides a category for UIViewController adding this slidingViewController
property.
You may also want to use ECSlidingViewController's currentTopViewPosition
to determine if your button should show your menu or hide it in the current context.