答案 0 :(得分:2)
要解决此问题,您需要在viewWillAppear方法中手动调用setNeedLayout,如下所述:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if #available(iOS 13.0, *) {
navigationController?.navigationBar.setNeedsLayout()
}
}