I am using ECSlidingViewController for creating "hamburger" menu for user with some options and one of them is login. I edited first example in archive with ECSlidingViewController and it's working and looking good.
Now I just want to extend this to have option after successful login to "redirect" user back to controller from which he taps on "hamburger" and go to login (like on websites). I think that I would need to save somewhere (maybe AppDelegate) from where I was going, is it right?
My AppDelegate looks like this:
@interface MAAppDelegate : UIResponder <UIApplicationDelegate> @property (nonatomic, strong) ECSlidingViewController *slidingViewController; @property (strong, nonatomic) UIWindow *window; @end This is method which is call after tap on "hamburger" (navigation bar item):
- (IBAction)menuButtonTap:(id)sender { if (self.slidingViewController.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered) { [self.slidingViewController anchorTopViewToLeftAnimated:YES]; } else { [self.slidingViewController resetTopViewAnimated:YES]; } } And in my MAMenuViewController (controller with static table for options in side menu) I have sets a few sliding segues for table cells to go to each controllers (main, login and so).