user1673099
user1673099

Reputation: 3289

Navigation bar is not shown properly when get back from Movie Player in iphone SDK

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.enter image description here

I am not taken mediaPlayer framework or any other class in my project.

How can i solved This issue??

Upvotes: 1

Views: 627

Answers (2)

Paras Joshi
Paras Joshi

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

Murali
Murali

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

Related Questions