How do you create a UIToolbar in Swift 3? I want an action on the left and action on the right and the title in the middle like most apps do. It also looks like a navigation controller without the back action arrow or stack.
The code is something like this:
let buttona = UIBarButtonItem(title: "Buttona", style: .plain, target: self, action: #selector(buttonaToolbar(sender:)));
let buttonb = UIBarButtonItem(title: "Buttonb", style: .plain, target: self, action: #selector(buttonbToolbar(sender:)));
let title = UILabel();
toolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: self.view.bounds.width, height: 44));
Here is the way to make a toolbar with two buttons and title in the middle Using swift 3 :
Now the write the functions for the actions: