title: Rotation on iOS device stops working when modal presented
body: <p>I have an iOS app for iPhone and iPad with supported interface orientations as Portrait (both) and Landscape (both). I have rotation code in <code>viewWillTransitionToSize</code> in all view controllers in the app. I present a modal from my ViewController in storyboard. When the modal is presented, the rotation code and auto layout constraints stop getting called in all view controllers - the one pushed and the topmost modal VC as well. </p>
  
  <p>Here is the code that presents, for example, a view controller. The segue is of kind "Present Modally". </p>
  
  <pre><code>-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
  
      if ([[segue identifier] isEqualToString:@"PreviewModal"]) {
  
          PreviewViewController *previewViewController = segue.destinationViewController;
  
          [self.stillCamera capturePhotoAsImageProcessedUpToFilter:self.exposureFilter withCompletionHandler:^(UIImage *processedImage, NSError *error) {
              UIImage *rotatedImage = [[UIImage alloc]initWithCGImage:processedImage.CGImage scale:1.0 orientation:UIImageOrientationUp];
              previewViewController.previewImage.image = rotatedImage;
              previewViewController.presetType = self.presetString;
          }];
      }
  }
  </code></pre>
  
  <p>I also go back with an unwind segue but there is no code in that unwind, it's just an empty unwind back to ViewController.</p>