Reputation: 3289
In my app, I load a HTML Page in Web View which contains a video. Till this the navigation bar is shown properly.
But when i play video with by default Movie Player in iphone & try to see it in Both Landscape/Portrait mode with Full Screen. When get Back from Movie Player, the Navigation Bar is go to upside & status Bar is Cover some view.
I am not taken mediaPlayer framework or any other class in my project.
How can i solved This issue??
Upvotes: 1
Views: 627
Reputation: 20541
Just paste this below line in to the viewWillAppear:
on that view controller class where this issue occurs.
Objective C
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
Swift
UIApplication.shared.setStatusBarHidden(false, with:UIStatusBarAnimation.none)
Upvotes: 1
Reputation: 1889
In your Movie player class replace
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
with
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
Means if you hide your status bar when came back from player then the height of the view will increased by 20 pixels. So your view will go upside
Upvotes: 0