Navigation toolbar continues vertically after returning from full-screen video

The first screen shot is taken before playing the video in full screen.

before

The second is taken after the video is open in full screen and closed.

enter image description here

Any idea why the navigation toolbar is expanding?

Note. The hamburger button is not part of the navigation element. It is fake in overlay in the parent object that contains the child controller inside the standard container.

Nothing special inside the source:

override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. bbiListic = UIBarButtonItem(image: UIImage(identifier: .IcoHeaderListic), style: .Plain, target: self, action: #selector(UIViewController.showListic)) bbiFavorite = UIBarButtonItem(image: UIImage(identifier: .IcoHeaderStarEmpty), style: .Plain, target: self, action: #selector(LiveDogadjajViewController.toggleFavorite(_:))) ... let items = [bbiListic!,bbiFavorite!] navigationItem.rightBarButtonItems = items } func someRefresh() { var items = [UIBarButtonItem]() items.append(bbiListic!) ... navigationItem.rightBarButtonItems = items } 

Update:

This seems to be a problem only in the latest version of iOS 9.3

+7
ios uinavigationbar
source share
3 answers

I contacted Apple Developer Technical Support on this issue. They determined that it was probably a mistake. in iOS 9.3.

Error ID: 26439832, iOS SDK

This is a simple solution for the view manager on the stack:

 // ... add this to init method let nc = NSNotificationCenter.defaultCenter() nc.addObserver(self, selector: #selector(didExitFullscreen(_:)), name: MPMoviePlayerDidExitFullscreenNotification, object: nil) func didExitFullscreen(notification: NSNotification) { // hack, fix for 9.3. if #available(iOS 9.3, *) { navigationController?.setNavigationBarHidden(true, animated: false) navigationController?.setNavigationBarHidden(false, animated: false) } } 
+1
source share

In your screenshots, it looks like the height of the status bar doubles. Try the following: -

Hide the status bar before playing the video

 UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: .None) 

After the video ends, display the status bar

 UIApplication.sharedApplication().setStatusBarHidden(false, withAnimation: .None) 
+2
source share

Premise:

a) Uncheck the "extends edge" checkbox by selecting your uiviewcontroller from main.storyboard

b) there are no restrictions between your video player and the container controller.

Decision:

Check if any of your buttons in the navigation bar are restricted. Remove this restriction or apply a fixed height constraint to your custom navigation bar screen so that it stays the same height.

+1
source share

All Articles