Below is happening with iOS 6.
I am playing video which can be played in potrait or landscape mode. Once video's Done button is pressed I am making screen to potrait mode programmatically.
The problem is when I open app, I have black status bar.
When I play video as potrait only, I still see black status bar as shown below.
Now when I play video and shift rotation after after playback is done and click Done button, I make app in potrait mode. BUT now my status bar is changed to light black (maybe BlackTransculent).
Also if you see, I see something black left to the time.
Any idea what is going wrong? This is literally making me crazy.
Edit 1
Below is the code I am using.
In viewcontroller.m
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
- (BOOL)shouldAutorotate
{
return NO;
}
In CustomNavigation.m
- (BOOL)shouldAutorotate
{
return [self.visibleViewController shouldAutorotate];
}
- (NSUInteger)supportedInterfaceOrientations
{
if (![[self.viewControllers lastObject] isKindOfClass:NSClassFromString(@"ViewController")])
{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
else
{
return [self.topViewController supportedInterfaceOrientations];
}
}
Note:
I am not using below code anymore.
[[UIDevice currentDevice] performSelector:NSSelectorFromString(@"setOrientation:") withObject:(id)UIInterfaceOrientationPortrait];
still this problem persist...