tags:

views:

199

answers:

1

Hello,

Stumped on this one. I am using a section of code posted here to rotate a view into landscape. Rotate, sizing and animations are working great, but when the view rotates, the status bar hangs around as a thin gray strip, which is the same size as the hidden status bar.

Here is the code:

[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];         
if (self.interfaceOrientation == UIInterfaceOrientationPortrait) {      
        self.view.transform = CGAffineTransformIdentity;
        self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
        self.view.bounds = CGRectMake(0.0, 0.0, 480, 320);
}
[UIView commitAnimations];

Thanks in advance!

+1  A: 

Did you set wantsFullScreenLayout = YES on your view controller?

Ole Begemann
Gave it a shot, no effect. Tried it just after I alloc'd the controller and in the load and willdisplay.
Rob Bonner