iphone cannot rotate views in TabBar controller

Posted by Luc on Stack Overflow See other posts from Stack Overflow or by Luc
Published on 2010-06-18T13:09:45Z Indexed on 2010/06/18 13:13 UTC
Read the original article Hit count: 490

Filed under:
|
|
|

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);
} 
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about listview