iOS UINavigationBar button remains faded after segue back

前端 未结 4 1785
时光说笑
时光说笑 2020-11-27 20:43

In my app I have multiple view controllers, and most have a right-hand-side UIBarButtonItem with direct \"show\" segue actions attached.

Having segued t

4条回答
  •  温柔的废话
    2020-11-27 21:24

    I solved it like this:

    override func viewWillDisappear(_ animated: Bool) {
        navigationController?.navigationBar.tintAdjustmentMode = .normal
        navigationController?.navigationBar.tintAdjustmentMode = .automatic
    }
    

    so it will restore the color before the other view appear

提交回复
热议问题