I want to modify the layout constraints when the device rotates.
My UIViewController is composed of 2 UIViews, in landscape they are horizontally a
override -(void) viewWillLayoutSubviews in your UIViewController to update your constraints as below code:
-(void) viewWillLayoutSubviews {
switch(self.interfaceorientation)
{
case UIInterfaceOrientationLandscapeLeft:
break;
case UIInterfaceOrientationLandscapeRight:
break;
case UIDeviceOrientationPortrait:
break;
case UIDeviceOrientationPortraitUpsideDown:
break;
}
}