title: how to lock portrait orientation for only main view using swift
body: <p>I have created an application for iPhone, using <strong>swift</strong>, that is composed from many views embedded in a navigation controller. I would like to lock the main view to Portrait orientation and only a subview of a navigation controller locked in Landscape orientation. 
  Here is an example of what i mean:</p>
  
  <ul>
  <li>UINavigationController
  <ul>
  <li>UiViewController1 (Locked in Portrait) <em>Initial view controller with a button placed on the navigation bar that give to the user the possibility to access to a lists where can be selected other views</em></li>
  <li>UIViewController2 (Locked in Landscape)</li>
  <li>UiViewController3 (Portrait and Landscape)</li>
  <li>UiViewController4 (Portrait and Landscape)</li>
  <li>...</li>
  <li>...</li>
  </ul></li>
  </ul>
  
  <p>How Can i do that?</p>