title: UIViewController, displayed modally, dismisses itself upon device rotation
body: <p>I've got a UIViewController that I'm using as a login view that's displayed modally above a UISplitViewController. Once the user has successfully logged in, the modal view is dismissed. The master view controller in the split view controller has a left bar button item to logging out. Once the logout button is tapped the login view controller is displayed modally again. If the user rotates the devices at this time, the modal login view is being dismissed. </p>
  
  <p>I have no idea how to catch this. When setting a breakpoint on viewWillDissappear on the login view controller only system API's are being called - nothing I wrote. </p>
  
  <p>A sample app that reproduces the problem can be found here: <a href="http://d.pr/f/c6oG" rel="nofollow">http://d.pr/f/c6oG</a></p>
  
  <p>Steps to Reproduce: Launch the attached app in portrait mode. Tap the login button. Tap the master button. Tap logout. Rotate the device left or right. The modal view dismisses.</p>
  
  <p>Expected Results: Launch the attached app in portrait mode. Tap the login button. Tap the master button. Tap logout. Rotate the device left or right. The modal view doesn't dismiss.</p>
  
  <p>Actual Results: The modal view dismisses upon device rotation after completing the steps to reproduce above. </p>
  
  <p>I've also filled a radar bug #12585564.</p>
  
  <p>Any ideas? Thanks in advance! </p>