Change color of done button in WKWebView

Viewed 523

I use this code in appDelegate to change color of all UIBarButtonItem of my navigationBar in my project to white

let whiteAttr = [NSAttributedStringKey.font : UIFont(name: "OpenSans", size: 14)! ,NSAttributedStringKey.foregroundColor: UIColor.white]
UIBarButtonItem.appearance().setTitleTextAttributes(whiteAttr, for: .normal)
UIBarButtonItem.appearance().setTitleTextAttributes(whiteAttr, for: .highlighted)

But Done button of my ToolBar in WKWebView is also white, how can i change the color ?

1 Answers
let BarButtonItemAppearance = UIBarButtonItem.appearance()
BarButtonItemAppearance.setTitleTextAttributes([NSAttributedStringKey.foregroundColor: UIColor.blue], for: .normal)
Related