iphone cannot rotate views in TabBar controller
- by Luc
Hello,
I am working on an application that consists of a TabBar controller.
Within on of its tab, I have a subclass of UITableViewController, within this list I have a Core-plot graph in the first cell and some other data in the 4 following cells.
When I return YES in the shouldAutorotateToInterfaceOrientation method, I would expect the autoresizing of the list view to happen, but... nothing.
When I add some log in the willRotateToInterfaceOrientation method, they are not displayed.
Is there something I missed ?
Thanks a lot,
Luc
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
//return (interfaceOrientation == UIInterfaceOrientationPortrait);
NSLog(@"Orientation");
return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
NSLog(@"Rotating");
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
NSLog(@"view land:%@", self.view);
}
if (toInterfaceOrientation == UIInterfaceOrientationPortrait)
{
NSLog(@"view portrait:%@", self.view);
}
}