- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)
toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft
|| toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
[scrollView setFrame:CGRectMake(0, 0, 568, 320)];
[scrollView setContentOffset:CGPointMake(leftLabel.frame.size.width - 284.0f, 0.0f)animated:YES];
}
else
{
scrollView.contentSize = CGSizeMake(leftLabel.frame.size.width +rightLabel.frame.size.width, leftLabel.frame.size.height);
[scrollView setContentOffset:CGPointMake(leftLabel.frame.size.width - 160.0f, 0.0f)animated:YES];
}
}
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return [self.navigationController supportedInterfaceOrientations];
}