title: disable rotation in single View iOS
body: <p>I am trying to disable rotation for just a single viewController in iOS, i have see some questions asked for auto rotate but none for this. </p>
  
  <p>I want to lock the orientation that View B opens into For ex: opens in landscape, it can only be landscape, or opens in portrait, it can only be portrait. While still allowing view A to be whatever orientation it wants. </p>
  
  <p><strong><em>EDIT</em></strong>
  \n 
  This is how i call view B </p>
  
  <pre><code>    [self.mediaFocusController showImageFromURL:url fromView:self.view withThumb:thumbUrl];
  </code></pre>
  
  <p>This is how it enters:</p>
  
  <pre><code>if (self.targetViewController) {
      [self willMoveToParentViewController:self.targetViewController];
      if ([UIView instancesRespondToSelector:@selector(setTintAdjustmentMode:)]) {
          self.targetViewController.view.tintAdjustmentMode = UIViewTintAdjustmentModeDimmed;
          [self.targetViewController.view tintColorDidChange];
      }
      [self.targetViewController addChildViewController:self];
      [self.targetViewController.view addSubview:self.view];
  
      if (self.snapshotView) {
          [self.targetViewController.view insertSubview:self.snapshotView belowSubview:self.view];
          [self.targetViewController.view insertSubview:self.blurredSnapshotView aboveSubview:self.snapshotView];
      }
  }
  else {
      // add this view to the main window if no targetViewController was set
      if ([UIView instancesRespondToSelector:@selector(setTintAdjustmentMode:)]) {
          self.keyWindow.tintAdjustmentMode = UIViewTintAdjustmentModeDimmed;
          [self.keyWindow tintColorDidChange];
      }
      [self.keyWindow addSubview:self.view];
  
      if (self.snapshotView) {
          [self.keyWindow insertSubview:self.snapshotView belowSubview:self.view];
          [self.keyWindow insertSubview:self.blurredSnapshotView aboveSubview:self.snapshotView];
      }
  }
  </code></pre>
  
  <p>I have NavigationController set up but this view is different</p>