title: SWRevealViewController dismiss correctly to navigate to next storyboard?
body: <p>I have 2 storyboard <em>login.storyboard</em> and <em>main.storybard</em>. On the *main.storyboard I use the <a href="https://github.com/John-Lluch/SWRevealViewController" rel="nofollow">SWRevealViewController</a>. In the sidebarmenu of the SWRevealViewController I have a logout function, which do the logout and redirect to the <em>login.storyboard</em>. By doing this I get the warning: </p>
  
  <pre><code>Warning: Attempt to present &lt;LoginViewController: 0x1551a630&gt;  on &lt;SidePanelViewController: 0x15645110&gt; which is already presenting (null)
  </code></pre>
  
  <p>I think the SidePanelViewController (which is the SWRevealViewController) is not dissmissed correctly. </p>
  
  <p><strong>How do I do this exactly, to avoid this issue?</strong></p>
  
  <h3>SidePanelViewController.h</h3>
  
  <pre class="lang-c prettyprint-override"><code>#import &lt;UIKit/UIKit.h&gt;
  #import "SingletonClass.h"
  
  @interface SidePanelViewController : UITableViewController
  
  @property (nonatomic, strong) SingletonClass *sshare;
  
  @end
  </code></pre>
  
  <h3>SidePanelViewController.m</h3>
  
  <pre class="lang-c prettyprint-override"><code>#import "SidePanelViewController.h"
  #import "SWRevealViewController.h"
  #import &lt;FacebookSDK/FacebookSDK.h&gt;
  
  @interface SidePanelViewController ()
  
  @property (nonatomic, strong) NSArray *menuItems;
  
  @end
  
  @implementation SidePanelViewController
  
  - (id)initWithStyle:(UITableViewStyle)style
  {
      self = [super initWithStyle:style];
      if (self) {
          // Custom initialization
          DLog(@"inited");
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      self.sshare = [SingletonClass sharedInstance];
      self.menuItems = @[@"toSurroundStream", @"toImprint", @"logout"];
  }
  
  #pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return [self.menuItems count];
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      NSString *CellIdentifier = [self getCellName:indexPath];
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      // Configure the cell...
      if (indexPath.row == 0) {
          cell.textLabel.text = [NSString stringWithFormat:@"%@'s Stream", self.sshare.username];
      }
  
      return cell;
  }
  
  -(NSString *)getCellName:(NSIndexPath *)indexPath {
      NSAssert(self.menuItems, @"menuItems is missing");
  
      NSString *cellName = @"nix";
  
      if (indexPath.row &lt; self.menuItems.count) {
          cellName = self.menuItems[indexPath.row];
      }
  
      DLog(@"cellName: %@", cellName);
      NSAssert(![cellName isEqualToString:@"nix"], @"No cellIdentifier found, check your menuLists. Consider IB as well");
  
      return cellName;
  }
  
  -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
      NSAssert(self.menuItems, @"Array with menuItems does not exist");
  
      if (indexPath.item &lt; self.menuItems.count) {
          NSString *cellName = [self getCellName:indexPath];
  
          DLog(@"cellName %@ call a method", cellName);
  
          if ([cellName isEqualToString:@"logout"]) {
              [self logout];
          }
  
  -(void)logout {
      DLog(@"doing the logout");
      [[FBSession activeSession] closeAndClearTokenInformation];
      [self toLoginView];
  }
  
  
  -(void)toImprint {
  #warning goto Imprint has to be implemented
  }
  
  -(IBAction)toLoginView {
  
      UIStoryboard *loginStoryboard = [UIStoryboard storyboardWithName:@"Login" bundle:nil];
      UIViewController *loginViewController = [loginStoryboard instantiateInitialViewController];
      loginViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
  
      [self dismissViewControllerAnimated:NO completion:nil];
  
      [self presentViewController:loginViewController animated:NO completion:nil];
  }
  
  - (void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender
  {
  
      if ( [segue isKindOfClass: [SWRevealViewControllerSegue class]] ) {
          SWRevealViewControllerSegue *swSegue = (SWRevealViewControllerSegue*) segue;
  
          swSegue.performBlock = ^(SWRevealViewControllerSegue* rvc_segue, UIViewController* svc, UIViewController* dvc) {
  
              UINavigationController* navController = (UINavigationController*)self.revealViewController.frontViewController;
              [navController setViewControllers: @[dvc] animated: NO ];
              [self.revealViewController setFrontViewPosition: FrontViewPositionLeft animated: YES];
          };
  
      }
  
  }
  
  @end
  </code></pre>