title: Implementing ECSlidingViewController
body: <p>I am trying to implement ECSlidingViewController &amp; I am using segues in my storyboards. I am having a problem where the <strong>MainViewController's viewDidLoad</strong> is being called twice and</p>
  
  <pre><code>self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
  </code></pre>
  
  <p>is always getting set to null. More information.</p>
  
  <ol>
  <li>LogIn Screen ( InitViewController ) ------through segue---------> MainViewController.</li>
  </ol>
  
  <p>In my MainViewController I have the following code.</p>
  
  <pre><code>-(void)addMenuViewControllerWithGesture{
  self.view.layer.shadowOpacity = 0.075f;
  self.view.layer.shadowRadius = 10.0f; 
  self.view.layer.shadowColor = [UIColor blackColor].CGColor;
  if (![self.slidingViewController.underLeftViewController isKindOfClass:[rsMenuViewController class]]) {
  
  self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
  }
  }
  </code></pre>
  
  <p>In My InitViewController (LogIn)</p>
  
  <pre><code>-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
  
  MainViewController *controller = segue.destinationViewController;
  
  // setting some values before going to the next view.
  
  controller.id = 0;
  
  controller.name = @"harish";
  
  self.topViewController = controller;
  
  }
  </code></pre>
  
  <p>By doing this, the <strong>MainViewController's viewDidLoad</strong> is getting called twice and the below value is always set to null.</p>
  
  <pre><code>self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
  </code></pre>
  
  <p>Hope it's clear. I am kind of stuck here and looking for a solution.</p>
  
  <p>Thanks</p>