title: Proper AutoresizingMask
body: <p>I have a view that appears at the center of its parent view portrait mode, what autoresizemask should I use so that it appears in the center in landscape mode too. It's size should remain same.I just want its origin should shift themselves automatically at the point so that it appears at the center.Any help please?</p>
  
  <p>I have given</p>
  
  <pre><code>[parentView setAutoResizesSubview:YES];
  
  parentView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
  </code></pre>