UPDATE 8/3/20:我在2016年发布了此消息。许多人表示此功能不再有效,因此使用时需您自担风险。我目前不在iOS系统中工作,所以没有更新方便。祝你好运!
这是一种实现方法:
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
let height: CGFloat = 50 //whatever height you want to add to the existing height
let bounds = self.navigationController!.navigationBar.bounds
self.navigationController?.navigationBar.frame = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height + height)
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句