title: AppDelegate's method for supported orientations is not called when UITableViewController is in navigation stack
body: <p>I have an app with a <code>UINavigationController</code>. The app needs to allow screen rotations, or not, depending on which <code>UIViewController</code> is currently at the top of the navigation stack. To achieve this I implemented an <code>AppDelegate</code> method, like below. Basically it allows rotation, but constrains things to <code>.portrait</code> if we're showing a <code>FooViewController</code>.</p>
  
  <pre><code>/// Return .all, unless FooViewController is being displayed
  func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -&gt; UIInterfaceOrientationMask { 
      if let nav = window?.rootViewController as? UINavigationController,
         let top = nc.topViewController {
          if top is FooViewController {
              return .portrait
          }            
      }
      return .all
  }
  </code></pre>
  
  <p>This works well, unless <code>FooViewController</code> is a <code>UITableViewController</code>. In that case, if I have a navigation stack like this:</p>
  
  <pre><code>FooViewController &gt; BarViewController
  </code></pre>
  
  <p>... and I rotate <code>Bar</code> to landscape, and then tap <strong>Back</strong>, <code>Foo</code> will also stay in landscape orientation. The <code>AppDelegate</code> method is never called.  </p>
  
  <p>If <code>Foo</code> is <em>not</em> a <code>UITableViewController</code>, then going back works as you'd want -- the <code>AppDelegate</code> method is called, and it returns <code>.portrait</code>, and the screen rotates back to portrait when you navigate back from <code>Bar</code> to <code>Foo</code>.</p>
  
  <p>So, what is it about <code>UITableViewController</code> that causes the system to stop calling the AppDelegate method to check on supported orientations?</p>