How can I set the title of UIToolBar such that it looks the same as the title in UINavigationBar?
I tried to use a button with plain style, it looks ok, but it will be
Swift 5 version of Rayfleck's great answer:
let titleButton = UIBarButtonItem(title: "My Title", style: .plain, target: nil, action: nil) titleButton.isEnabled = false titleButton.setTitleTextAttributes([.foregroundColor : UIColor.black], for: .disabled)
Add this button to the toolbar as normal.