title: How lock screen in iOS for it to have only portrait orientation?
body: <p>I have created an app with many views and I want to have some of them only in portrait orientation.
  I have coded this in .m file:</p>
  
  <pre><code>-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      return NO;
  }
  </code></pre>
  
  <p>Do I need to do something else? May be in .h file?</p>