I've created programmatically a View, an UIImageView and a Button. The problem is that i need to update their position if the device switches from Portrait to Landscape, how can I do it?
This should be the code that checks if the Device is in Portrait or Landscape mode
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
}
else
{
}
}