title: Xamarin Forms on iOS How To Set Screen Orientation for Page?
body: <p>So the title says it all. Im concerned at this point with iOS. I have tried to sue a custom renderer for my base page "LandscapeContentPage" which would hopefully force it to be rendered as landscape. I have been unsuccessful.</p>
  
  <p>I attempted to use a hack I found where in ViewDidAppear you present a "fake" UIViewController that overrides the GetSupportedInterfaceOrientations to only return Landscape. This sort of works. The meat looks like this:</p>
  
  <pre><code>var c = new LandscapeViewController();
  c.View.BackgroundColor = UIColor.Cyan;
  
  await PresentViewControllerAsync(c, false);
  await DismissViewControllerAsync(false);
  </code></pre>
  
  <p>If I set a breakpoint at the Dismiss line I can see in the simulator that the view did change to landscape, the simulator window actually rotates on its own. When I continue either an error is thrown about view transitions or the ViewDidAppear fires again and the original page is displayed in portrait orientation.</p>
  
  <p>So, I'm more or less lost at this point. I have tried so many different things and had zero success. I can't figure out why there isn't an out of the box mechanism for this. Such an expensive toolset/framework seems incomplete without orientation handling.</p>
  
  <p>Thanks.</p>