title: How to allow only single UIViewController to rotate in both Landscape and Portrait direction?
body: <p>My app is only for <code>iphone</code> device (both iphone 4  and 5) and built to support only <code>ios 6</code>.</p>
  
  <p>My whole app only supports <code>portrait</code> mode. But there is one view called  "<code>ChatView</code>" , which i want to support both <code>landscape</code> and <code>portrait</code> modes. </p>
  
  <p>I have set the required device rotations as follows -</p>
  
  <p><img src="https://i.stack.imgur.com/PWgki.png" alt="enter image description here"></p>
  
  <p>I have also tried following code to support rotation in "ChatView" -</p>
  
  <pre><code>-(BOOL)shouldAutorotate
  {
      return YES;
  }
  
  -(NSUInteger)supportedInterfaceOrientations
  {
      return UIInterfaceOrientationMaskLandscape;
  }
  </code></pre>
  
  <p>But it could not rotate that view.</p>
  
  <p>I have searched a lot for this , but could not be able to find the solution for my issue.</p>
  
  <p>And also in "ChatView" there are some objects like buttons, textfields  whose frames are set programmaticaly. So i want to know should i have to set frames of all those objects for landscape mode also?</p>
  
  <p>Please help me.</p>
  
  <p>Thanks.....</p>