第一个屏幕截图是在全屏播放视频之前拍摄的。
第二张是视频全屏打开关闭后拍摄的。
知道为什么导航工具栏会扩展吗?
注意:汉堡包按钮不是导航项的一部分。它是在父级的覆盖层中伪造的,将其子 Controller 保存在标准容器中。
源代码中没有什么特别的:
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
}
更新:
这似乎只在最新版本的 iOS 9.3 上出现问题
最佳答案
从您的屏幕截图来看,状态栏的高度看起来增加了一倍。试试这个:-
播放视频前,隐藏状态栏
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: .None)
结束视频后,显示状态栏
UIApplication.sharedApplication().setStatusBarHidden(false, withAnimation: .None)
关于ios - 从全屏视频返回后导航工具栏垂直延伸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37205211/