title: SWRevealViewController close left side view when navigation back button pressed
body: <p>I have a front view controller and a slide side view.. On navigation bar back button pressed, I have been poping the viewcontroller, to previous view controller. I want my side view to slide out, if it was open when i press back button. </p>
  
  <p>My code is 
        I have a navigation bar with a back button as :</p>
  
  <pre><code> [navbar.backViewButton addTarget:self action:@selector(backBtnClicked) forControlEvents:UIControlEventTouchUpInside];
  </code></pre>
  
  <p>On back button press:</p>
  
  <pre><code>-(void)backBtnClicked{
  [self.navigationController popViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>I know I can add revealtoggle as:</p>
  
  <pre><code>-(void)backBtnClicked{
  [self.revealViewController revealToggleAnimated:YES];
  [self.navigationController popViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>But this gives me a problem, if the side view was closed previously, it toogles and open it, and that is something i don't want on pressing the back button.</p>
  
  <p>I want something like</p>
  
  <pre><code>-(void)backBtnClicked{
   if([self.revealViewController isSideViewAppeared or isSideviewShowing]){     
  [self.revealViewController revealToggleAnimated:YES];
  }
  [self.navigationController popViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>Help needed.. Thanks in advance</p>