Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate a tutorial screen into the RESideMenu? #58

Closed
goelv opened this issue Nov 5, 2013 · 3 comments
Closed

How to integrate a tutorial screen into the RESideMenu? #58

goelv opened this issue Nov 5, 2013 · 3 comments

Comments

@goelv
Copy link

goelv commented Nov 5, 2013

Hi Roman,

I am using RESideMenu in my project and I want to incorporate a tutorial screen for the user.

This is what I want to do:

  1. the first time the app loads, direct the user to the tutorial screen.
  2. in future app launches, the app should load to the one of my other view controllers but give the option to the user to go back to the tutorial screen.

For simplicity sake, consider the tutorial screen to be another view controller which will be part of the RESideMenu 'menu view controller'.

Is there a way to do this?
thanks,
Varun

@romaonthego
Copy link
Owner

  1. Set window root view controller to your tutorial view controller
  2. Once tutorial is completed, set the root controller to the side menu.
  3. If user wants to go back to tutorial, again reassign the root view controller.

@goelv
Copy link
Author

goelv commented Nov 6, 2013

I'm using storyboards as it is mentioned here: https://github.com/romaonthego/RESideMenu#storyboards-example

My function "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions" doesn't have any setup for the RESideMenu.

In my storyboard, I have a view controller of class 'rootViewController' which is my initial view controller for my project.

In the rootViewController.m file all the code I have is this:

  • (void)awakeFromNib
    {
    NSLog(@"in awake from nib");
    self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"];
    self.menuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"menuViewController"];
    self.backgroundImage = [UIImage imageNamed:@"Stars"];
    }

Where 'contentViewController' is a UINavigationViewController which has other UIViewControllers associated with it and 'menuViewController' is a UIViewController with file name DEMOMenuViewController (which i got from the sample project).

I tried your way of assigning my tutorial view controller to be the root view controller, by adding these lines to my didFinishLaunchingWithOptions method:
[self.window setRootViewController:vc];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];

then I wasn't able to load the RESideMenu controller after the tutorial was over by re-setting the root controller..

Hope this makes sense!
Varun

@kuldeept92
Copy link

how to dynamic change content of side menu. .. ? please help us fast .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants