title: Autolayout: updateConstraints doesn't get call on orientation change
body: <p>I am learning how Auto layout works in iOS. For this I created a sample single view application which has one view controller (which is initial view controller) and one custom View (lets call it a sample view). I added sample view to the view controller in the Main.storyboard with auto-layouting constraints. I added a button and a label to Sample View with auto-layouting constraints. I override layoutSubviews and updateConstraints method in SampleView.m. These overridden methods do nothing but calling their super implementation. I added a break point to both of these methods and start debugging the application. Following are my observation</p>
  
  <ol>
  <li><p>I found out that updateConstraints is called before the layoutSubviews method in SampleView. However I read few posts/answers where it is mentioned that layoutSubviews is called before updateConstraints. Now I am confused what is the correct mechanism? does updateConstraint called before layoutSubviews or it is vice versa. How auto-layouting system works?</p></li>
  <li><p>When I rotate the device from portrait to landscape or landscape to portrait, I found out that updateConstraints method of SampleView does not get call automatically (however the layoutSubviews method get called automatically), while I read few posts/answers which says that on rotation, updateConstraints method get call automatically. I am again confused which one is true? </p></li>
  <li><p>If updateConstrains method does not get call automatically on orientation change then how can we invoke the updateConstraint method on all views in the view hierarchy when the orientation changes? Will calling setNeedsUpdateConstraint on the parent most view, will invoke updateConstraint on all the child views of that view?</p></li>
  </ol>